-
Notifications
You must be signed in to change notification settings - Fork 2
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
Fix a bug of plotter which contains inf #165
Conversation
for more information, see https://pre-commit.ci
Pull Request Test Coverage Report for Build 9259389522Details
💛 - Coveralls |
Thanks! It is also possible that the posterior is NaN. We should add that check as well and give a warning if it contains inf/NaN. |
for more information, see https://pre-commit.ci
appletree/plot.py
Outdated
self.prior = backend.get_blobs(discard=discard, thin=thin) | ||
# We drop iterations with inf and nan posterior | ||
mask = ~np.isinf(self.posterior) & ~np.isnan(self.posterior) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use numpy.isfinite
Sometimes the posterior contains inf, which corrupts the xy limit setting of the corner plot. This PR drops the iterations and samples with inf posterior.