[Numpy-discussion] Adding a return value to np.random.shuffle

Joseph Fox-Rabinovitz jfoxrabinovitz at gmail.com
Thu Apr 12 13:36:23 EDT 2018


Would it break backwards compatibility to add the input as a return value
to np.random.shuffle? I doubt anyone out there is relying on the None
return value.

The change is trivial, and allows shuffling a new array in one line instead
of two:

    x = np.random.shuffle(np.array(some_junk))

I've implemented the change in PR#10893.

Regards,

- Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20180412/4fa4e766/attachment.html>


More information about the NumPy-Discussion mailing list