SciPy
csr_matrix.has_sorted_indices
Whether the indices are sorted
True: if the indices of the array/matrix are in sorted order
False: otherwise