If you want to get the index of the sorted list for the original list, apply np.argsort()
twice. In the example, 1 is the smallest value so it is indexed 0. 2 is the second-largest value to it is indexed 1.
If you want to get the index of the sorted list for the original list, apply np.argsort()
twice. In the example, 1 is the smallest value so it is indexed 0. 2 is the second-largest value to it is indexed 1.