Re: [Numpy-discussion] broadcasting for randint

2016-05-21 Thread G Young
Hi,

I have had a PR  open for quite
some time now that allows arguments to broadcast in *randint*.  While the
functionality is fully in-place and very robust, the obstacle at this point
is the implementation.

When the *dtype* parameter was added to *randint* (see here
), a big issue with the
implementation was that it created so much duplicate code that it would be
a huge maintenance nightmare.  However, this was dismissed in the original
PR message because it was believed that template-ing would be trivial,
which seemed reasonable at the time.

When I added broadcasting, I introduced a template system to the code that
dramatically cut down on the duplication.  However, the obstacle has been
whether or not this template system is too *ad hoc* to be merged into the
library.  Implementing a template in Cython was not considered sufficient
and is in fact very tricky to do, and unfortunately, I have not received
any constructive suggestions from maintainers about how to proceed, so I'm
opening this up to the mailing to see whether or not there are better
alternatives to what I did, whether this should be merged as it, or whether
this should be tabled until a better template can be found.

Thanks!
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
https://mail.scipy.org/mailman/listinfo/numpy-discussion


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
higher-performing than the original *count_nonzero* function, the obstacle
at this point is the implementation, as most of the functionality is now
surfaced at the Python level instead of at the C level.

I have made several attempts to move the code into C to no avail and have
not received much feedback from maintainers unfortunately to move this
forward, so I'm opening this up to the mailing list to see what you guys
think of the changes and whether or not it should be merged in as is or be
tabled until a more C-friendly solution can be found.

Thanks!
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
https://mail.scipy.org/mailman/listinfo/numpy-discussion