diff options
author | Ralf Gommers <ralf.gommers@gmail.com> | 2020-04-25 16:13:27 +0200 |
---|---|---|
committer | Ralf Gommers <ralf.gommers@gmail.com> | 2020-04-25 16:13:27 +0200 |
commit | fbe082d6aeb9356107906a66ec3879d42c4d2638 (patch) | |
tree | d7b66682bd6c1bcefb2177b70d49c0add2835e6a | |
parent | 6d6df47fefdc503fbcffd8cb14a5daaa956ef220 (diff) | |
download | numpy-fbe082d6aeb9356107906a66ec3879d42c4d2638.tar.gz |
DOC: add a note on sampling 2-D arrays to random.choice docstring
Addresses a comment on gh-10835.
-rw-r--r-- | numpy/random/mtrand.pyx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/numpy/random/mtrand.pyx b/numpy/random/mtrand.pyx index 540e19ec6..0c0c611af 100644 --- a/numpy/random/mtrand.pyx +++ b/numpy/random/mtrand.pyx @@ -848,6 +848,11 @@ cdef class RandomState: randint, shuffle, permutation Generator.choice: which should be used in new code + Notes + ----- + Sampling random rows from a 2-D array is not possible with this function, + but is possible with `Generator.choice` through its ``axis`` keyword. + Examples -------- Generate a uniform random sample from np.arange(5) of size 3: |