How could I use an array from numpy and return an array with the index of each sorted element of the original array?
For example, In: [10, 5, 13, 2]
, and I expect the Output will be [2, 1, 3, 0]
.
The "argsort" function doesn't work for me, because it returns an output that I don't want (Output [3 1 0 2]), that is it sorts inside and returns the array but with the elements sorted, and I need it with the order of the original array.