What is the most efficient way to do the Matlab equivalent of nnz(M)
(nnz = number-of-non-zeros function)?

I've tried Google, but no luck.

My assumption is that something like

a != 0

will be used, but I'm not sure then how to "count" the number of "True"
entries.

TIA.

Ian

<<attachment: ijstokes.vcf>>

_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to