Some people consider that not to be Pythonic:
https://mail.python.org/pipermail/python-dev/2003-October/038855.html

Alan Isaac

On 4/12/2018 1:36 PM, Joseph Fox-Rabinovitz wrote:
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.


_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion

Reply via email to