You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mariosasko
changed the title
pa.FixedShapeTensorArray.to_numpy_ndarray fails on sliced arrays
[Python]pa.FixedShapeTensorArray.to_numpy_ndarray fails on sliced arrays
May 12, 2023
… sliced arrays (#36164)
### Rationale for this change
`pa.FixedShapeTensorArray.to_numpy_ndarray` fails if called on a sliced `FixedShapeTensorArray`.
### What changes are included in this PR?
The use of `pyarrow.FixedSizeListArray.values` is replaced with `pyarrow.FixedSizeListArray.flatten()` in `FixedShapeTensorArray.to_numpy_ndarray`.
### Are these changes tested?
Yes, test is added to _python/pyarrow/tests/test_extension_type.py_
### Are there any user-facing changes?
No.
* Closes: #35573
Authored-by: AlenkaF <frim.alenka@gmail.com>
Signed-off-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
Describe the bug, including details regarding any error messages, version, and platform.
MRE:
The error stems from the following line:
arrow/python/pyarrow/array.pxi
Line 3156 in cd6e2a4
(
.values
ignores the slicing offset)Component(s)
Python
The text was updated successfully, but these errors were encountered: