<div dir="ltr"><div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Mon, Sep 17, 2018 at 7:38 AM Matthew Brett <<a href="mailto:matthew.brett@gmail.com">matthew.brett@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
Is there any reason that np.count_nonzero should not take an axis<br>
argument?  As in:<br>
<br>
>>> np.better_count_nonzero([[10, 11], [0, 3]], axis=1)<br>
array([2, 1])<br>
<br></blockquote><div><br></div><div><br></div><div>It already does (since version 1.12.0): <a href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.count_nonzero.html">https://docs.scipy.org/doc/numpy/reference/generated/numpy.count_nonzero.html</a><br></div><div><br></div><div>Warren</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
It would be much more useful if it did...<br>
<br>
Cheers,<br>
<br>
Matthew<br>
_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@python.org" target="_blank">NumPy-Discussion@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/numpy-discussion" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/numpy-discussion</a><br>
</blockquote></div></div></div>