<div dir="ltr"><div><div>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()...<br><br></div>Thanks!<br></div>Ben Root<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 10, 2014 at 2:27 PM, Stephan Hoyer <span dir="ltr"><<a href="mailto:shoyer@gmail.com" target="_blank">shoyer@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Fri, Oct 10, 2014 at 11:23 AM, Benjamin Root <span dir="ltr"><<a href="mailto:ben.root@ou.edu" target="_blank">ben.root@ou.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div>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?<br></div></div></div></blockquote><div><br></div></span><div>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 np.all.<br></div><div><br></div></div></div></div>
<br>_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/numpy-discussion" target="_blank">http://mail.scipy.org/mailman/listinfo/numpy-discussion</a><br>
<br></blockquote></div><br></div>