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

brycemecum pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new 0f3ec82466 MINOR: [Docs][Python] Fix return type in docstring for 
Array.slice (#44134)
0f3ec82466 is described below

commit 0f3ec82466a6de6df8f86d392313c39a206bc1cc
Author: Bryce Mecum <[email protected]>
AuthorDate: Tue Sep 17 09:33:43 2024 -0700

    MINOR: [Docs][Python] Fix return type in docstring for Array.slice (#44134)
    
    ### Rationale for this change
    
    Currently the docstring for Array.slice says it returns a RecordBatch. I 
don't see how this is possible with the existing code. My guess is that this 
was a copy-and-paste error back when the Array and RecordBatch slice impls were 
added in https://issues.apache.org/jira/browse/ARROW-547.
    
    ### What changes are included in this PR?
    
    Just a docstring change. I copied the language from the take method so 
things are consistent.
    
    ### Are these changes tested?
    
    No.
    
    ### Are there any user-facing changes?
    
    Just docs.
    
    Authored-by: Bryce Mecum <[email protected]>
    Signed-off-by: Bryce Mecum <[email protected]>
---
 python/pyarrow/array.pxi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/python/pyarrow/array.pxi b/python/pyarrow/array.pxi
index 93c4429759..ae9e7fd777 100644
--- a/python/pyarrow/array.pxi
+++ b/python/pyarrow/array.pxi
@@ -1437,7 +1437,8 @@ cdef class Array(_PandasConvertible):
 
         Returns
         -------
-        sliced : RecordBatch
+        sliced : Array
+            An array with the same datatype, containing the sliced values.
         """
         cdef shared_ptr[CArray] result
 

Reply via email to