SciPy
Section Navigation
bsr_matrix.count_nonzero
Number of non-zero entries, equivalent to
np.count_nonzero(a.toarray())
Unlike the nnz property, which return the number of stored entries (the length of the data attribute), this method counts the actual number of non-zero entries in data.
previous
scipy.sparse.bsr_matrix.copy
next
scipy.sparse.bsr_matrix.deg2rad