Use “np.all” or “np.any”.

On 18 Dec 2017, 10:02 PM +1100, hanno_li...@gmx.net, wrote:
> Hi,
>
> is it possible, to apply a logical operation, such as AND or OR along a 
> particular axis of a numpy array?
>
> Let's say I have an (n,m) array and I want to AND along the first axis, such 
> that I get a (1,m) (or just (m,) dimensional array back. I looked at the 
> documentation for np.logical_and and friends but couldn't find an axis 
> keyword on the logical_xyz operations and nothing else seemed to fit.
>
> Thanks, and best regards,
> Hanno
>
>
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion

Reply via email to