AlenkaF commented on issue #51145:
URL: https://github.com/apache/arrow/issues/51145#issuecomment-5617017198

   Thanks for the issue @ivirshup 
   The difference between `.take` and `.slice` is that they take two different 
code paths. `.take` goes through the compute module code path, where 
[`_pack_compute_args`](https://github.com/apache/arrow/blob/926885f1b1ede73badd24c2e6f63c9429441e99a/python/pyarrow/_compute.pyx#L494)
 does the type mapping, then C++ compute functions are all called with 
`arrow::Datum` arguments. Whereas the `.slice` code path goes to the C++ 
`Array::Slice` which expects `int64_t offset` and `int64_t length`.
   
   I agree, `.slice` behavior could be improved on the Python side. Will look 
at the PR now.


-- 
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]

Reply via email to