nikolauspschuetz opened a new pull request, #57267:
URL: https://github.com/apache/spark/pull/57267
### What changes were proposed in this pull request?
The `Parameters` section of `BisectingKMeansModel.computeCost` (in
`python/pyspark/mllib/clustering.py`) documented the argument as `point`, but
the method signature names it `x`:
```python
def computeCost(self, x: Union["VectorLike", RDD["VectorLike"]]) -> float:
...
Parameters
----------
point : :py:class:`pyspark.mllib.linalg.Vector` or
:py:class:`pyspark.RDD`
```
This renames the docstring entry from `point` to `x` so the documented
parameter matches the actual signature.
### Why are the changes needed?
The documented parameter name did not exist in the signature. NumPyDoc-style
`Parameters` entries are expected to name the actual arguments; the mismatch is
misleading in the rendered API docs. For contrast, the sibling
`GaussianMixtureModel.computeCost` in the same file already documents its `rdd`
argument correctly.
### Does this PR introduce _any_ user-facing change?
No. Documentation-only wording fix in a docstring.
### How was this patch tested?
No behavior change. Verified the file with `python -m py_compile` and `ruff
check` (both pass). The rendered docstring now names the same parameter as the
signature.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 4.8)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]