summaryrefslogtreecommitdiff
path: root/numpy/random
diff options
context:
space:
mode:
authorJulian Taylor <juliantaylor108@gmail.com>2016-02-23 21:51:44 +0100
committerJulian Taylor <juliantaylor108@gmail.com>2016-02-23 21:51:44 +0100
commitb3aa073c02c424ee67aed7c7e36b8bdb4e82a41f (patch)
tree05325f6d7dafdec7ebc224b21cd57c6de6b26cc3 /numpy/random
parent4b78b9025f54a6818c5ed0b6c210f0b49516686d (diff)
parentc5e01fa725e5e7c1993b7eec401fa31be8580420 (diff)
downloadnumpy-b3aa073c02c424ee67aed7c7e36b8bdb4e82a41f.tar.gz
Merge pull request #7279 from madphysicist/percentile-tests
TST: Fixed elements being shuffled
Diffstat (limited to 'numpy/random')
-rw-r--r--numpy/random/mtrand/mtrand.pyx7
1 files changed, 5 insertions, 2 deletions
diff --git a/numpy/random/mtrand/mtrand.pyx b/numpy/random/mtrand/mtrand.pyx
index 964129a8c..db4ea13e6 100644
--- a/numpy/random/mtrand/mtrand.pyx
+++ b/numpy/random/mtrand/mtrand.pyx
@@ -5021,6 +5021,10 @@ cdef class RandomState:
Modify a sequence in-place by shuffling its contents.
+ This function only shuffles the array along the first axis of a
+ multi-dimensional array. The order of sub-arrays is changed but
+ their contents remains the same.
+
Parameters
----------
x : array_like
@@ -5037,8 +5041,7 @@ cdef class RandomState:
>>> arr
[1 7 5 2 9 4 3 6 0 8]
- This function only shuffles the array along the first index of a
- multi-dimensional array:
+ Multi-dimensional arrays are only shuffled along the first axis:
>>> arr = np.arange(9).reshape((3, 3))
>>> np.random.shuffle(arr)