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

2018-04-12 Thread Joseph Fox-Rabinovitz
Agreed. I closed the PR. - Joe On Thu, Apr 12, 2018 at 4:24 PM, Alan Isaac wrote: > 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:

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

2018-04-12 Thread Alan Isaac
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

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

2018-04-12 Thread Joseph Fox-Rabinovitz
Sounds good. I will close the PR. - Joe On Thu, Apr 12, 2018 at 1:54 PM, Sebastian Berg wrote: > On Thu, 2018-04-12 at 13:36 -0400, Joseph Fox-Rabinovitz wrote: > > Would it break backwards compatibility to add the input as a return > > value to np.random.shuffle? I

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

2018-04-12 Thread Eric Wieser
I’m against this change, because it: - Is inconsistent with the builtin random.shuffle - Makes it easy to fall into the trap of assuming that np.random.shuffle does not mutate it’s input Eric ​ On Thu, 12 Apr 2018 at 10:37 Joseph Fox-Rabinovitz wrote: >

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

2018-04-12 Thread Joseph Fox-Rabinovitz
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