SciPy

scipy.sparse.csr_matrix.sort_indices

csr_matrix.sort_indices()[source]

Sort the indices of this matrix in place