summaryrefslogtreecommitdiff
path: root/doc/release
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2018-06-24 11:00:24 -0700
committerGitHub <noreply@github.com>2018-06-24 11:00:24 -0700
commit464f79eb1d05bf938d16b49da1c39a4e02506fa3 (patch)
tree74b5abffade18baf587413fc0f72256590ab3564 /doc/release
parentfca7a15f30776ebce9e6814eb927e837f567a518 (diff)
parent9013b0f60d9bc93f3c433df66757ac7589ec450b (diff)
downloadnumpy-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.rst6
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
=======