pisa
pisa copied to clipboard
Ratio in map comparison fails if reference hist has zero nominal values and is not a bare numpy array
Setting np.errstate
in https://github.com/jllanfranchi/pisa/blob/dev/pisa/core/map.py#L521 doesn't help when hist
is an uncertainties.unumpy.uarray
(I think this has been an open issue for a long time: https://github.com/lebigot/uncertainties/issues/12). This can be fixed by applying set_errors(None)
to the reference map before the division is performed.
This is actually not sufficient, since np.errstate
only effective when both maps that are compared have no uncertainties defined (in the case of a zero in the reference map).