Skip to content

Commit

Permalink
Use theano float type to set the espilon value
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexAndorra committed Aug 12, 2020
1 parent 0f98497 commit 01e5575
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pymc3/distributions/continuous.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
nodes in PyMC.
"""
import numpy as np
import theano
import theano.tensor as tt
from scipy import stats
from scipy.special import expit
Expand Down Expand Up @@ -3341,7 +3342,7 @@ def logp(self, value):

standardized_val = (value - mu) / sigma
cdf_val = std_cdf(standardized_val - sigma / nu)
cdf_val_safe = tt.switch(tt.eq(cdf_val, 0), np.finfo(float).eps, cdf_val)
cdf_val_safe = tt.switch(tt.eq(cdf_val, 0), np.finfo(theano.config.floatX).eps, cdf_val)

# This condition is suggested by exGAUS.R from gamlss
lp = tt.switch(
Expand Down

0 comments on commit 01e5575

Please sign in to comment.