Skip to content

Commit

Permalink
Merge pull request #77 from dcherian/faster-validation-axis--1
Browse files Browse the repository at this point in the history
Use faster group_idx creation when axis == -1
  • Loading branch information
ml31415 committed Mar 27, 2023
2 parents fa62e23 + 717b96c commit 6b7877b
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 6b7877b

Please sign in to comment.