scipy.sparse.csr_matrix.ensure_sorted_indices

csr_matrix.ensure_sorted_indices(inplace=False)

Return a copy of this matrix where the column indices are sorted

This Page