SciPy

scipy.sparse.bsr_matrix.sort_indices

bsr_matrix.sort_indices()[source]

Sort the indices of this matrix in place