diff --git a/pymc3/distributions/continuous.py b/pymc3/distributions/continuous.py index 80a943c83f4..2899e262003 100644 --- a/pymc3/distributions/continuous.py +++ b/pymc3/distributions/continuous.py @@ -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 @@ -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(