[Numpy-discussion] fix random.choice for 1.7?

Alan G Isaac alan.isaac at gmail.com
Mon Nov 12 17:34:23 EST 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 mailing list