diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2018-06-24 11:00:24 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-24 11:00:24 -0700 |
commit | 464f79eb1d05bf938d16b49da1c39a4e02506fa3 (patch) | |
tree | 74b5abffade18baf587413fc0f72256590ab3564 /doc/release | |
parent | fca7a15f30776ebce9e6814eb927e837f567a518 (diff) | |
parent | 9013b0f60d9bc93f3c433df66757ac7589ec450b (diff) | |
download | numpy-464f79eb1d05bf938d16b49da1c39a4e02506fa3.tar.gz |
Merge pull request #11383 from mattip/recreate-8717
ENH: Allow size=0 in numpy.random.choice
Diffstat (limited to 'doc/release')
-rw-r--r-- | doc/release/1.16.0-notes.rst | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/release/1.16.0-notes.rst b/doc/release/1.16.0-notes.rst index d9208e80b..8df763b56 100644 --- a/doc/release/1.16.0-notes.rst +++ b/doc/release/1.16.0-notes.rst @@ -34,6 +34,12 @@ New Features Improvements ============ +``randint`` and ``choice`` now work on empty distributions +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Even when no elements needed to be drawn, ``np.random.randint`` and +``np.random.choice`` raised an error when the arguments described an empty +distribution. This has been fixed so that e.g. +``np.random.choice([], 0) == np.array([], dtype=float64)``. Changes ======= |