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

flib.normal (and normal_like) returns nan instead of -inf #12

Closed
borisaqua opened this issue Feb 22, 2011 · 2 comments
Closed

flib.normal (and normal_like) returns nan instead of -inf #12

borisaqua opened this issue Feb 22, 2011 · 2 comments

Comments

@borisaqua
Copy link
Contributor

flib.normal (and normal_like) returns nan instead of -inf for very low values, resulting in sampler craching. For example: normal_like(-1e99,1e99,1e999)

Could be fixed by modifying normal_like:
res = flib.normal(x, mu, tau)
if np.isnan(res): res = -np.Inf
return res

@jsalvatier
Copy link
Member

the numexpr_dist branch (python likelihoods) appears to handle this correctly.

@apatil
Copy link
Contributor

apatil commented Feb 22, 2011

Fixed in cfcbd59, thanks

This issue was closed.
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

3 participants