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

Nathaniel Smith njs@pobox....
Mon Nov 12 09:00:10 CST 2012


On Mon, Nov 12, 2012 at 3:50 PM, Alan G Isaac <alan.isaac@gmail.com> wrote:
> On 11/12/2012 8:59 AM, Sebastian Berg wrote:
>> https://github.com/numpy/numpy/blob/master/numpy/random/mtrand/mtrand.pyx#L919
>>
>> Sounds like it should be pretty simple to add axis=None which would
>> change the current behavior very little, it would stop give an error
>> anymore for none 1-d arrays though.
>
> I believe Nathaniel suggested *retaining* this error
> until two things were supported: flattening ndarrays,
> and choice of subarrays for ndarrays.

Just to be clear, I don't really have an opinion on whether those
things should be supported, or what the right API should be; I haven't
really thought about it. Maybe others on the list have opinions. I was
just saying that we have plenty of time to decide about these things,
it's not an emergency that should hold up the 1.7 release (or risk
locking in a bad API).

-n


More information about the NumPy-Discussion mailing list