I have an array like this:
[[0, 46.0], [1, 83.0], [2, 111.0], [3, 18.0], [4, 37.0], [5, 55.0], [6, 0.0], [7, 9.0], [8, 9.0]]
I want to return the array where the second element is the highest. In this example: [2, 111]
How can I do that?
Until now I have tried numpy.amax(array, axis=0) and numpy.amax(array, axis=1). But they do not consider my condition, that I just want to consider the last element per array.
max(my_list, key=lambda x: x[1])?