west_merge

nbi_stat.west_merge(meana, cova, sumwa, sumw2a, summwa, meanb, covb, sumwb, sumw2b, summwb, ddof)[source]

Merge two statistics into one

Note, this function will _always_ return arrays, _even_ if the input state variables are scalar. This simplifies the algorithm a lot, and we can defer the overhead of coercing to scalar to the user and the last possible point of evaluation

maarray-like, float

Mean of sample A

cvaarray-like, float

(Co)variance of sample A

w1aarray-like, float

Sum of weights of sample A

w2aarray-like, float, or None

Sum of square weights of sample A or None. If None, we assume the weights are frequency weights and we calculate the (co)variance accordingly

waarray-like, float or None

Sum of weights of sample A. If None, we assume non-component weights.

mbarray-like, float

Mean of sample B

cvbarray-like, float

(Co)variance of sample B

w1barray-like, float

Sum of weights of sample B

w2barray-like, float, or None

Sum of square weights of sample B or None. If None, we assume the weights are frequency weights and we calculate the (co)variance accordingly

wbarray-like, float or None

Sum of weights of sample B. If None, we assume non-component weights.

ddofint

Delta degrees of freedom. Use 1 for the unbiased estimator of the variance, otherwise 0. Note, this is only used if sumw2 is None