jorisvandenbossche commented on PR #34883: URL: https://github.com/apache/arrow/pull/34883#issuecomment-1503728907
> > For a specific use case, someone might not care about the permutation and just wants the physical C-contiguous array > > Wouldn't that not be possible with `tensor_ext_arr.storage.to_numpy()`? Or would that not be zero-copy? `to_numpy()` gives a 1D object-dtype array of arrays, so that's not convenient to work with if you want the nD array (it can actually be "zero-copy", but you can't get the zero-copy nD array from it) > How about we have pyarrow pass the permutation/strides information by default and have users use lower level API for manual handling of permutation / dim_names? What do you mean exactly with "pass the permutation/strides information"? (I suppose you mean returning the permuted/logical array by default?) Users could indeed do this conversion to an nD array manually (the `to_numpy_ndarray` implementation isn't that long), but to me that feels a bit the point of providing this method ;) (it could be a keyword argument to the function, to indicate if you want the permuted logical array or not) -- 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]
