index of max number array python code example
Example 1: get index of highest value in array python
result = numpy.where(arr == numpy.amax(arr))
Example 2: index of maximum value in list python
[i for i, x in enumerate(l) if x == max(l)]
result = numpy.where(arr == numpy.amax(arr))
[i for i, x in enumerate(l) if x == max(l)]