You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "jorisvandenbossche (via GitHub)" <gi...@apache.org> on 2023/03/30 07:09:39 UTC

[GitHub] [arrow] jorisvandenbossche opened a new issue, #34787: [Python] Accept keywords in ChunkedArray.to_numpy() for compatibility with Array.to_numpy()

jorisvandenbossche opened a new issue, #34787:
URL: https://github.com/apache/arrow/issues/34787

   ### Describe the enhancement requested
   
   Currently, if you have "a" pyarrow array object that can be either array or chunked array, and you call `to_numpy` with something that cannot be zero copy, you need to do:
   
   ```python
   if isinstance(array, pyarrow.Array):
       np_arr = array.to_numpy(zero_copy_only=False)
   else:
       np_arr = array.to_numpy()
   ```
   
   instead of simply:
   
   ```python
   np_arr = array.to_numpy(zero_copy_only=False)
   ```
   because the chunked array version doesn't accept the keyword. To make this easier, I think we should just accept that keyword in `ChunkedArray.to_numpy()` as well (and only accept False as a possible value)
   
   ### Component(s)
   
   Python


-- 
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: issues-unsubscribe@arrow.apache.org.apache.org

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


[GitHub] [arrow] jorisvandenbossche closed issue #34787: [Python] Accept keywords in ChunkedArray.to_numpy() for compatibility with Array.to_numpy()

Posted by "jorisvandenbossche (via GitHub)" <gi...@apache.org>.
jorisvandenbossche closed issue #34787: [Python] Accept keywords in ChunkedArray.to_numpy() for compatibility with Array.to_numpy()
URL: https://github.com/apache/arrow/issues/34787


-- 
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: issues-unsubscribe@arrow.apache.org

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