diff options
author | Ralf Gommers <ralf.gommers@gmail.com> | 2021-01-23 19:36:22 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-23 19:36:22 +0000 |
commit | 5cbfefb4c69b130f8b01408615e9f7b42b707beb (patch) | |
tree | 06c88b2a7a2870d51abbd6a1130b802b1714fac2 | |
parent | 768acb7cf856bb49d4d183f8e9cbd456ecc32475 (diff) | |
download | numpy-5cbfefb4c69b130f8b01408615e9f7b42b707beb.tar.gz |
Remove duplicate axis check
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
-rw-r--r-- | numpy/random/_generator.pyx | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/numpy/random/_generator.pyx b/numpy/random/_generator.pyx index ba1713dfa..3033a1495 100644 --- a/numpy/random/_generator.pyx +++ b/numpy/random/_generator.pyx @@ -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 |