Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ratio in map comparison fails if reference hist has zero nominal values and is not a bare numpy array #479

Open
thehrh opened this issue Mar 21, 2018 · 1 comment

Comments

@thehrh
Copy link
Contributor

thehrh commented Mar 21, 2018

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: lmfit/uncertainties#12). This can be fixed by applying set_errors(None) to the reference map before the division is performed.

@thehrh
Copy link
Contributor Author

thehrh commented Apr 20, 2018

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants