cmatrix.Matrix.count_zero¶
- Matrix.count_zero()¶
Count the number of zeros in the self Matrix
- Returns
- int
Count number of zeros containes in the self matrix.
Examples
>>> m=rand_perm(4) >>> print(m) | +0.000 | +1.000 | +0.000 | +0.000 | | +0.000 | +0.000 | +1.000 | +0.000 | | +1.000 | +0.000 | +0.000 | +0.000 | | +0.000 | +0.000 | +0.000 | +1.000 | printed >>> print(m.count_zero()) 12