You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "jorisvandenbossche (via GitHub)" <gi...@apache.org> on 2023/11/14 12:57:15 UTC
Re: [I] [Python ]Does PyArrow support writing nested dictionaries of torch tensors to parquet? [arrow]
jorisvandenbossche commented on issue #38675:
URL: https://github.com/apache/arrow/issues/38675#issuecomment-1810156052
I think it would probably make sense to support any "array-like" (defined by some protocol, eg `__array_interface__` or `__dlpack__`) instead of only numpy arrays.
At the moment this fails in the TypeInferrer for python objects. We have the following for sequence like objects:
https://github.com/apache/arrow/blob/160d45c251b5041b9688ff68c3a7c5e091a50989/python/pyarrow/src/arrow/python/inference.cc#L400-L409
So we currently support sets, lists, tuples and ndarrays (`PyArray_Check` is from the numpy C API to check for numpy ndarrays).
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org