barak.utilities.wmean¶
- barak.utilities.wmean(val, sig)[source]¶
Return the weighted mean and error. Uses inverse variances as weights.
Parameters : val : array with shape (N,)
Array of values.
sig : array with shape (N,)
One sigma errors (sqrt(variance)) of the array values.
Returns : wmean, wsigma : floats
The weighted mean and error on the weighted mean.