Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
Description
Currently ListArray.flatten() simply returns the child array. If a ListArray is a slice of another ListArray, they will share the same child array, however the expected behavior (I think) of flatten() should be returning an Array that's a concatenation of all the sub-lists in the ListArray, so the slicing offset should be taken into account.
For example:
a = pa.array([[1], [2], [3]])
assert a.flatten().equals(pa.array([1,2,3]))
- expected:
a.slice(1).flatten().equals(pa.array([2, 3]))
Attachments
Issue Links
- links to