Re: [Numpy-discussion] axis parameter for count_nonzero

2016-06-16 Thread G Young
Just wanted to ping the mailing this again about this PR. Just to recap, some simplification has been done thanks to some suggestions by *@rgommers*, though the question still remains whether or not leaving the *axis* parameter in the Python API for now (given how complicated it is to add in the

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] 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*.

Re: [Numpy-discussion] axis parameter for count_nonzero

2016-05-21 Thread G Young
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*. While the functionality is fully in-place, very robust, and actually