[Numpy-discussion] fix random.choice for 1.7?
Alan G Isaac
Mon Nov 12 16:34:23 CST 2012
On 11/12/2012 12:16 PM, Sebastian Berg wrote:
> So instead of taking a sequence of length 1, take an element as default.
Sebastien has proposed that np.random.choice return
a single *element* by default, not a 1d array of length 1.
He proposes to associate this with a default value of `size=None`.
The motivation: it is more natural, and in particular,
it would behave more like Python's random.choice by default.
This decision should be made before this function
is part of a release.
More information about the NumPy-Discussion