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

2014-10-10 Thread Benjamin Root
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? Cheers! Ben Root ___

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

2014-10-10 Thread Stephan Hoyer
On Fri, Oct 10, 2014 at 11:23 AM, Benjamin Root ben.r...@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,

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

2014-10-10 Thread Benjamin Root
Oy! I got to be having a brain fart today. np.all on the list of boolean arrays applied on the first(?) axis is much clearer than any ufunc or reduce call. And to answer the next question... use np.any for logical_or()... Thanks! Ben Root On Fri, Oct 10, 2014 at 2:27 PM, Stephan Hoyer

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

2014-10-10 Thread Sebastian Berg
On Fr, 2014-10-10 at 14:30 -0400, Benjamin Root wrote: Oy! I got to be having a brain fart today. np.all on the list of boolean arrays applied on the first(?) axis is much clearer than any ufunc or reduce call. And to answer the next question... use np.any for logical_or()... Of course