SciPy

scipy.sparse.csr_matrix.check_format

csr_matrix.check_format(full_check=True)[source]

check whether the matrix format is valid

Parameters:
full_check : bool, optional

If True, rigorous check, O(N) operations. Otherwise basic check, O(1) operations (default True).