[Numpy-discussion] count_nonzero axis argument?

Matthew Brett matthew.brett at gmail.com
Mon Sep 17 07:37:09 EDT 2018


Hi,

Is there any reason that np.count_nonzero should not take an axis
argument?  As in:

>>> np.better_count_nonzero([[10, 11], [0, 3]], axis=1)
array([2, 1])

It would be much more useful if it did...

Cheers,

Matthew


More information about the NumPy-Discussion mailing list