Skip to content

Commit

Permalink
use ak._slicing.normalize_integer_like(head)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianna authored Sep 19, 2024
1 parent ed55752 commit bd7b125
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/awkward/contents/listarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,7 @@ def _getitem_next(
nexthead, nexttail = ak._slicing.head_tail(tail)
lenstarts = self._starts.length
nextcarry = ak.index.Index64.empty(lenstarts, self._backend.index_nplike)
head = ak._slicing.normalize_integer_like(head)
assert (
nextcarry.nplike is self._backend.index_nplike
and self._starts.nplike is self._backend.index_nplike
Expand All @@ -728,9 +729,7 @@ def _getitem_next(
self._starts.data,
self._stops.data,
lenstarts,
int(
head
), # NOTE: when 'at' is an integer it is always 'int64' for both CPU and GPU kernels
head,
),
slicer=head,
)
Expand Down

0 comments on commit bd7b125

Please sign in to comment.