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 <ste...@sun.ac.za>
wrote:

> Hi Warren
>
> On 2014-10-12 00:51:56, Warren Weckesser <warren.weckes...@gmail.com>
> wrote:
> > 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!
>
> Stéfan
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to