Skip to content

Comments

replace math.exp with np.exp#2939

Merged
junpenglao merged 1 commit intopymc-devs:masterfrom
junpenglao:np_exp
Apr 21, 2018
Merged

replace math.exp with np.exp#2939
junpenglao merged 1 commit intopymc-devs:masterfrom
junpenglao:np_exp

Conversation

@junpenglao
Copy link
Member

math.exp return overflow error when input is too large. Switching to np.exp resolves this.

@springcoil
Copy link
Contributor

springcoil commented Apr 20, 2018 via email

@ColCarroll
Copy link
Member

I think now instead of throwing an error, it will (silently) pass on a float('inf'), which hopefully other machinery can deal with more intelligently. At worst this will change the error that appears, and at best, it allows more models to be fit, right?

Specifically, I don't think we need a regression test.

@junpenglao
Copy link
Member Author

I think now instead of throwing an error, it will (silently) pass on a float('inf'), which hopefully other machinery can deal with more intelligently.

Exactly.

@springcoil
Copy link
Contributor

springcoil commented Apr 20, 2018 via email

@junpenglao junpenglao merged commit be35733 into pymc-devs:master Apr 21, 2018
@junpenglao junpenglao deleted the np_exp branch April 21, 2018 08:02
agustinaarroyuelo pushed a commit to agustinaarroyuelo/pymc3 that referenced this pull request Feb 8, 2019
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

Successfully merging this pull request may close these issues.

3 participants