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

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


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

commit ddb112da518ee5dcfd627ae9f9eb46017432a798
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 053727263ac4..db9e67a05b3f 100644
--- a/python/pyspark/rdd.py
+++ b/python/pyspark/rdd.py
@@ -1106,7 +1106,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