[Numpy-discussion] use ufunc for arbitrary positional arguments?

Stephan Hoyer shoyer at gmail.com
Fri Oct 10 14:27:52 EDT 2014

On Fri, Oct 10, 2014 at 11:23 AM, Benjamin Root <ben.root at ou.edu> wrote:

> I have a need to "and" together an arbitrary number of boolean arrays.
> np.logical_and() expects only two positional arguments. There has got to be
> some sort of easy way to just and these together using the ufunc mechanism,
> right?

Do you really need a ufunc? The obvious way to do this (at least to me)
would be use reduce (if you're especially concerned about memory) or just
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20141010/66c823e0/attachment.html>

More information about the NumPy-Discussion mailing list