Hi I am trying to convert some Matlab code to Python.
Here is the Matlab code:
[n,i] = sort(n);
n is already defined as an array with data, but i is not defined as anything in the entire code as far as I can see. This is what I tried to do:
[n,i] = n.sort(axis = 0)
But it said "'NoneType' object is not iterable"
I know that there is data in n, so how do I deal with i?
lower down in the matlab code I have:
y = y(i)
What does this mean, and how do I convert this to Python?