scipy.sparse.spmatrix.count_nonzero
scipy.sparse.spmatrix.dot
Returns the main diagonal of the matrix