Use np.average instead of np.mean