I'm trying to sort in descend order an array of float (63,) called LAM. I did using the following code and it is working.
LAM_Sorted = -np.sort(-LAM, axis=0)
What about if now I want to have also the arrangement of the elements, so an array with the same size of LAM with values indicating the previous position on the column vector of each element?
In MATLAB for example is the returned array I in the built-in sort function, explained below:
[B,I] = sort(___)also returns a collection of index vectors for any of the previous syntaxes.Iis the same size asAand describes the arrangement of the elements ofAintoBalong the sorted dimension. For example, ifAis a vector, thenB = A(I).
Thanks in advance, let me know.