SciPy

scipy.sparse.bsr_matrix.sorted_indices

bsr_matrix.sorted_indices()[source]

Return a copy of this matrix with sorted indices