[Numpy-discussion] Request for enhancement to numpy.random.shuffle
hoogendoorn.eelco at gmail.com
Sun Oct 12 06:00:29 EDT 2014
yeah, a shuffle function that does not shuffle indeed seems like a major
source of bugs to me.
Indeed one could argue that setting axis=None should suffice to give a
clear enough declaration of intent; though I wouldn't mind typing the extra
bit to ensure consistent semantics.
On Sun, Oct 12, 2014 at 10:56 AM, Stefan van der Walt <stefan at sun.ac.za>
> Hi Warren
> On 2014-10-12 00:51:56, Warren Weckesser <warren.weckesser at gmail.com>
> > A small wart in this API is the meaning of
> > shuffle(a, independent=False, axis=None)
> > It could be argued that the correct behavior is to leave the
> > array unchanged.
> I like the suggested changes. Since "independent" loses its meaning
> when axis is None, I would expect this to have the same effect as
> `shuffle(a, independent=True, axis=None)`. I think a shuffle function
> that doesn't shuffle will confuse a lot of people!
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion