I'm trying to find a function that returns all occurrences of the maximum in a given list.
numpy.argmax
however only returns the first occurrence that it finds. For instance:
from numpy import argmax
list = [7, 6, 5, 7, 6, 7, 6, 6, 6, 4, 5, 6]
winner = argmax(list)
print winner
gives only index 0
. But I want it to give all indices: 0, 3, 5
.