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

'FloatingPointError: underflow encountered in logaddexp' occurs when setting np.seterr(all='raise') #24

Open
alatif-alatif opened this issue Dec 27, 2020 · 0 comments

Comments

@alatif-alatif
Copy link

Hi,

I installed bayesian_changepoint_detection from this github repository.

By setting (accidentally) np.seterr(all='raise'), I was able to cause the following exception.

I am not sure whether this would have any relevance for the further processing, but I just wanted to draw attention to people working on / with this library.

/home/user/venv/env01/bin/python3.6 /home/user/PycharmProjects/project01/snippet.py
Use scipy logsumexp().
Traceback (most recent call last):
  File "/home/user/PycharmProjects/project01/snippet.py", line 68, in <module>
    Q, P, Pcp = offcd.offline_changepoint_detection(data, partial(offcd.const_prior, l=(len(data) + 1)), offcd.gaussian_obs_log_likelihood, truncate=-40)
  File "/home/user/experiments/original-unforked/bayesian_changepoint_detection/bayesian_changepoint_detection/offline_changepoint_detection.py", line 98, in offline_changepoint_detection
    Q[t] = np.logaddexp(P_next_cp, P[t, n-1] + antiG)
FloatingPointError: underflow encountered in logaddexp

Process finished with exit code 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant