def harmonic_mean(lst):
    "Returns the harmonic mean. Will crash if any value is zero."
    n = len(lst)
    inv_sum = sum((x / 1.0) for x in lst)
    return (1.0 / ((1.0 / n) * inv_sum))
dataset/ETHPy150Open armon/pypred/pypred/util.py/harmonic_mean/swapped operands of `/`