I want to find indices in ascending order of elements in last row in a 2D numpy array. An example is as below.
ti = np.array([[255, 2, 255, 9], [4, 255, 6, 255], [23, 11, 5, 18]])
# output = function(ti[-1])
# output : 2, 1, 3, 0
How do I achieve this? np.argmin only gives one minimum, and I could not find any other way including using partition (which returns sorted elements instead). Kindly help.
[255, 2, 255, 9]and[4, 255, 6, 255]? How would you determine the "minimum"?2, 1, 3, 0denote exactly?2, 1, 3, 0is supposed to be.