

def argmax(x):
    if (len(x) < 2):
        return x[0]
    (bestv, idx) = (x[0], 0)
    for (e, i) in enumerate(x[1:], 1):
        if (i > bestv):
            bestv = i
            idx = e
    return idx

dataset/ETHPy150Open Ttl/evolutionary-circuits/evolutionary/chromosomes/common.py argmax/original