This is an automated email from the ASF dual-hosted git repository.

yao pushed a commit to branch branch-3.5
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-3.5 by this push:
     new d7ce89ab959a [MINOR][DOCS][PYTHON] Fix documentation typo in 
takeSample method
d7ce89ab959a is described below

commit d7ce89ab959a0122fa915832901b2383f1b335ea
Author: Michał Kimborowicz <michal.kim...@gmail.com>
AuthorDate: Thu Mar 7 19:34:22 2024 +0800

    [MINOR][DOCS][PYTHON] Fix documentation typo in takeSample method
    
    ### What changes were proposed in this pull request?
    Fixed an error in the docstring documentation for the parameter 
`withReplacement` of `takeSample` method in `pyspark.RDD`, should be of type 
`bool`, but is `list` instead.
    
https://spark.apache.org/docs/latest/api/python/reference/api/pyspark.RDD.takeSample.html
    
    ### Why are the changes needed?
    They correct a mistake in the documentation.
    
    ### Does this PR introduce _any_ user-facing change?
    No.
    
    ### How was this patch tested?
    \-
    
    ### Was this patch authored or co-authored using generative AI tooling?
    No.
    
    Closes #45419 from kimborowicz/master.
    
    Authored-by: Michał Kimborowicz <michal.kim...@gmail.com>
    Signed-off-by: Kent Yao <y...@apache.org>
    (cherry picked from commit 7a429aa84a5ed2c4b6448d43e88c475919ea2210)
    Signed-off-by: Kent Yao <y...@apache.org>
---
 python/pyspark/rdd.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/python/pyspark/rdd.py b/python/pyspark/rdd.py
index 8ea9a3102229..aa63c6509dce 100644
--- a/python/pyspark/rdd.py
+++ b/python/pyspark/rdd.py
@@ -1120,7 +1120,7 @@ class RDD(Generic[T_co]):
 
         Parameters
         ----------
-        withReplacement : list
+        withReplacement : bool
             whether sampling is done with replacement
         num : int
             size of the returned sample


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to