`weightedmean()` returns `NaN ± 0`?
Fenyutanchan opened this issue · comments
weightedmean([1 ± 0, 1 ± 0])
returns NaN ± 0
, but 1 ± 0
is expected. Could you give me a better solution? Thank you very much.
The explanation of what happens is simple: the weights are proportional to the inverse of the variances, so that 0-errors would result in NaN
. I'm not sure what's the best solution, apart from special-casing 0, but also how? Do you have any concrete suggestion of how to address this problem?