I have a nx2 array where the first column represents x-coordinates and the second column y-coordinates, for example:
array = np.array([0,3],
[1,5],
[2,1],
[3,2])
How can I obtain the minimum y-coordinate with the corresponding x-coordinate returned allong with it? In the example, I want [1,2] returned, where 2 is the row index, not the numerical value contained in the array, but 1 is the actual numerical value.
I know I can simply use np.amin(array[:,1]) to obtain the minimum y-coordinate, but this doesn't give me any info of what x-coordinate corresponds to the y-minimum.
I have looked at the documentation of np.amin to see if it can return two parameters but it does not look like it can.