def weighted_average(x, e):
    return np.average(x, weights=1. / (e**2))
Arithmetic mean of observed values, weighted by measurement errors.
dataset/ETHPy150Open cesium-ml/cesium/cesium/science_features/common_functions.py/weighted_average