[Numpy-discussion] counting non-zero entries in an ndarray
Alan G Isaac
Wed Dec 22 08:20:02 CST 2010
On 12/22/2010 9:16 AM, Ian Stokes-Rees wrote:
> a != 0
> will be used, but I'm not sure then how to "count" the number of "True"
(a != 0).sum()
More information about the NumPy-Discussion