def argmax_proba(values):
    """ Return probabilies w/r/t the max value, scaled to the number of max values """

    # Handle special cases
    if len(values) == 1:
        return [1,]

    probs     = []
    max_value = max(values)
    flag_max  = [i == max_value for i in values]
    num_maxes = sum(flag_max)

    for i in flag_max:
        if i:
            probs.append(1 / num_maxes)
        else:
            probs.append(0)
    return probs