SciPy

scipy.sparse.linalg.SuperLU.nnz

SuperLU.nnz

Number of nonzero elements in the matrix.