summaryrefslogtreecommitdiff
path: root/numpy/random/generator.pyx
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/random/generator.pyx')
-rw-r--r--numpy/random/generator.pyx6
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/random/generator.pyx b/numpy/random/generator.pyx
index 37ac57c06..df7485a97 100644
--- a/numpy/random/generator.pyx
+++ b/numpy/random/generator.pyx
@@ -3786,7 +3786,7 @@ cdef class Generator:
# Shuffling and permutations:
def shuffle(self, object x, axis=0):
"""
- shuffle(x)
+ shuffle(x, axis=0)
Modify a sequence in-place by shuffling its contents.
@@ -3858,7 +3858,7 @@ cdef class Generator:
x = np.swapaxes(x, 0, axis)
buf = np.empty_like(x[0, ...])
with self.lock:
- for i in reversed(range(1, n)):
+ for i in reversed(range(1, len(x))):
j = random_interval(&self._bitgen, i)
if i == j:
# i == j is not needed and memcpy is undefined.
@@ -3928,7 +3928,7 @@ cdef class Generator:
def permutation(self, object x, axis=0):
"""
- permutation(x)
+ permutation(x, axis=0)
Randomly permute a sequence, or return a permuted range.