np.sort() returns a sorted copy of an array, and np.argsort() returns the indices that would sort it.