Skip to content

Commit

Permalink
fix: drop option where necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
agoose77 committed Oct 24, 2023
1 parent 0134e28 commit dfd9660
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/awkward/contents/indexedoptionarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -1265,10 +1265,15 @@ def _argsort_next(
nextoutindex.length,
)
)

out = ak.contents.IndexedOptionArray.simplified(
nextoutindex, out, parameters=self._parameters
)
# Drop the option type: we have ensured that we don't have any
# -1 values in `nextoutindex` now!
out = out._carry(nextoutindex, False).copy(
parameters=parameters_union(out._parameters, self._parameters)
)
else:
out = ak.contents.IndexedOptionArray.simplified(
nextoutindex, out, parameters=self._parameters
)

inject_nones = (
True
Expand Down

0 comments on commit dfd9660

Please sign in to comment.