scipy.sparse.spmatrix
scipy.sparse.spmatrix.shape
Number of stored values, including explicit zeros.
See also