def mean(vals):
  n = 0.0
  d = 0.0
  for v in vals:
    if v is not None:
      n += v
      d += 1.0
  if d == 0.0:
    return None
  return n/d
dataset/ETHPy150Open jansel/opentuner/opentuner/utils/stats.py/mean/original