Re: [Numpy-discussion] Behavior of .reduceat()

2016-05-22 Thread Feng Yu
Hi Marten, As a user of reduceat I seriously like your new proposal! I notice that in your current proposal, each element in the 'at' list shall be interpreted asif they are parameters to `slice`. I wonder if it is meaningful to define reduceat on other `fancy` indexing types? Cheers, - Yu

Re: [Numpy-discussion] Behavior of .reduceat()

2016-05-22 Thread Marten van Kerkwijk
Hi Jaime, Very belated reply, but only with the semester over I seem to have regained some time to think. The behaviour of reduceat always has seemed a bit odd to me, logical for dividing up an array into irregular but contiguous pieces, but illogical for more random ones (where one effectively

Re: [Numpy-discussion] axis parameter for count_nonzero

2016-05-22 Thread G Young
After some discussion with *@rgommers*, I have simplified the code as follows: 1) the path to the original count_nonzero in the C API is essentially unchanged, save some small overhead with Python calling and the if-statement to check the *axis* parameter 2) All of the complicated validation of

Re: [Numpy-discussion] axis parameter for count_nonzero

2016-05-22 Thread G Young
1) Correction: The PR was not written with small arrays in mind. I ran some new timing tests, and it does perform worse on smaller arrays but appears to scale better than the current implementation. 2) Let me put it out there that I am not opposed to moving it to C, but right now, there seems to

Re: [Numpy-discussion] Proposal: numpy.random.random_seed

2016-05-22 Thread Robert Kern
On Wed, May 18, 2016 at 7:56 PM, Nathaniel Smith wrote: > > On Wed, May 18, 2016 at 5:07 AM, Robert Kern wrote: > > On Wed, May 18, 2016 at 1:14 AM, Nathaniel Smith wrote: > >> ...anyway, the real reason I'm a bit grumpy is because there

Re: [Numpy-discussion] axis parameter for count_nonzero

2016-05-22 Thread Ralf Gommers
On Sun, May 22, 2016 at 3:05 AM, G Young wrote: > Hi, > > I have had a PR open (first > draft can be found here ) for > quite some time now that adds an 'axis' parameter to *count_nonzero*.