Skip to content

Commit 01e5575

Browse files
committed
Use theano float type to set the espilon value
1 parent 0f98497 commit 01e5575

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pymc3/distributions/continuous.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
nodes in PyMC.
1919
"""
2020
import numpy as np
21+
import theano
2122
import theano.tensor as tt
2223
from scipy import stats
2324
from scipy.special import expit
@@ -3341,7 +3342,7 @@ def logp(self, value):
33413342

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

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

0 commit comments

Comments
 (0)