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 im
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:
> Would it break backwards compat
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 doubt anyone out there is relying on
> the None return value.
>
Well, python discourages this IIRC, and opts to not do these things
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 doubt anyone out there is re
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 t
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:
>
>> Would it break bac