You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "nikolauspschuetz (via GitHub)" <gi...@apache.org> on 2026/07/15 03:25:02 UTC

[PR] [MINOR][PYTHON] Fix parameter name in BisectingKMeansModel.computeCost docstring [spark]

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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [MINOR][PYTHON][ML][DOC] Fix parameter name in BisectingKMeansModel.computeCost docstring [spark]

Posted by "zhengruifeng (via GitHub)" <gi...@apache.org>.
zhengruifeng commented on PR #57267:
URL: https://github.com/apache/spark/pull/57267#issuecomment-4988611223

   **Merge Summary:**
   - merged into master https://github.com/apache/spark/commit/26c2015f5cdbdfb03e554182abfbe05fd0d30daa
   - merged into branch-4.x https://github.com/apache/spark/commit/c1dae9ed315e4a4d1dc9b48b64615186122a5fc4
   
   *Posted by `merge_spark_pr.py`*


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [MINOR][PYTHON][ML][DOC] Fix parameter name in BisectingKMeansModel.computeCost docstring [spark]

Posted by "zhengruifeng (via GitHub)" <gi...@apache.org>.
zhengruifeng closed pull request #57267: [MINOR][PYTHON][ML][DOC] Fix parameter name in BisectingKMeansModel.computeCost docstring
URL: https://github.com/apache/spark/pull/57267


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org