Skip to content

Commit

Permalink
Use faster group_idx creation when axis == -1
Browse files Browse the repository at this point in the history
  • Loading branch information
dcherian committed Mar 27, 2023
1 parent 3ab5474 commit 717b96c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion numpy_groupies/utils_numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,6 @@ def input_validation(
axis=None,
ravel_group_idx=True,
check_bounds=True,
method="ravel",
func=None,
):
"""Do some fairly extensive checking of group_idx and a, trying to
Expand Down Expand Up @@ -331,6 +330,7 @@ def input_validation(
else:
unravel_shape = None

method = "offset" if axis == ndim_a - 1 else "ravel"
group_idx, size = _ravel_group_idx(
group_idx, a, axis, size, order, method=method
)
Expand Down

0 comments on commit 717b96c

Please sign in to comment.