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

Catch the NaN error that occurs when histograms are not well-populated #2

Closed
mrshirts opened this issue Jun 20, 2016 · 2 comments
Closed
Assignees
Labels

Comments

@mrshirts
Copy link
Contributor

When distributions are chosen poorly, it's very likely the ratio of the histograms will be undefined, as the denominator will be zero. This needs to be caught with a proper warning.

@mrshirts mrshirts added the bug label Jun 20, 2016
@mrshirts mrshirts self-assigned this Jun 20, 2016
@mrshirts
Copy link
Contributor Author

mrshirts commented Mar 6, 2017

The issues show up as warnings:

checkensemble/checkensemble/checkensemble.py:910: RuntimeWarning: divide by zero encountered in log
ratio = numpy.log(hlist[1]/hlist[0]) # this should have the proper exponential distribution
checkensemble/checkensemble/checkensemble.py:911: RuntimeWarning: invalid value encountered in divide
dratio = numpy.sqrt((dhlist[0]/hlist[0])**2 + (dhlist[1]/hlist[1])**2)
checkensemble/checkensemble/checkensemble.py:910: RuntimeWarning: divide by zero encountered in divide
ratio = numpy.log(hlist[1]/hlist[0]) # this should have the proper exponential distribution

@ptmerz
Copy link
Member

ptmerz commented May 8, 2017

Migrated: shirtsgroup/physical_validation#1

@ptmerz ptmerz closed this as completed May 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants