summaryrefslogtreecommitdiff
path: root/doc/release
diff options
context:
space:
mode:
authormattip <matti.picus@gmail.com>2018-06-19 15:39:20 -0700
committermattip <matti.picus@gmail.com>2018-06-19 15:39:20 -0700
commit95dada6c5a4654da6c7f3edbe409bda31ffc755b (patch)
treee99eea66f19915d3ad1c4af44cd5f98c059951ac /doc/release
parentebedea271a5bb0f7a3251c6d390fd14652912118 (diff)
downloadnumpy-95dada6c5a4654da6c7f3edbe409bda31ffc755b.tar.gz
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 701ef1f6e..31658a8a4 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
=======