Skip to content

Commit

Permalink
Remove duplicate axis check
Browse files Browse the repository at this point in the history
Co-authored-by: Eric Wieser <[email protected]>
  • Loading branch information
rgommers and eric-wieser authored Jan 23, 2021
1 parent 768acb7 commit 5cbfefb
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions numpy/random/_generator.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -4416,10 +4416,6 @@ cdef class Generator:
_shuffle_raw_wrap(&self._bitgen, n, 1, itemsize, stride,
x_ptr, buf_ptr)
elif isinstance(x, np.ndarray):
if axis >= x.ndim:
raise np.AxisError(f"Cannot shuffle along axis {axis} for "
f"array of dimension {x.ndim}")

if x.size == 0:
# shuffling is a no-op
return
Expand Down

0 comments on commit 5cbfefb

Please sign in to comment.