From 2d24309fe18750299589199d44deb85d00a38c8c Mon Sep 17 00:00:00 2001 From: Jim Pivarski Date: Thu, 17 Feb 2022 20:35:20 -0600 Subject: [PATCH] Fixed botched merge. --- src/awkward/_v2/contents/listoffsetarray.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/awkward/_v2/contents/listoffsetarray.py b/src/awkward/_v2/contents/listoffsetarray.py index 2e83a78acc..7bad0a97b6 100644 --- a/src/awkward/_v2/contents/listoffsetarray.py +++ b/src/awkward/_v2/contents/listoffsetarray.py @@ -1661,9 +1661,7 @@ def _reduce_next( maxnextparents = ak._v2.index.Index64.empty(1, self._nplike) distincts = ak._v2.index.Index64.empty(distincts_length, self._nplike) assert ( - nextcarry.nplike is self._nplike - and nextparents.nplike is self._nplike - and maxnextparents.nplike is self._nplike + maxnextparents.nplike is self._nplike and distincts.nplike is self._nplike and self._offsets.nplike is self._nplike and offsetscopy.nplike is self._nplike @@ -1694,9 +1692,8 @@ def _reduce_next( ) ) - reorder = self._nplike.argsort( - np_nextparents, kind="stable" - ) # "stable" is essential! + # A "stable" sort is essential for the subsequent steps. + reorder = self._nplike.argsort(np_nextparents, kind="stable") nextcarry = ak._v2.index.Index64(np_nextcarry[reorder]) nextparents = ak._v2.index.Index64(np_nextparents[reorder])