diff --git a/pymc_experimental/distributions/continuous.py b/pymc_experimental/distributions/continuous.py index ab5a53d4..d43c02de 100644 --- a/pymc_experimental/distributions/continuous.py +++ b/pymc_experimental/distributions/continuous.py @@ -205,7 +205,9 @@ def logcdf(value, mu, sigma, xi): pt.isclose(xi, 0), -pt.exp(-scaled), -pt.pow(1 + xi * scaled, -1 / xi) ) - logc = pt.switch(1 + xi * (value - mu) / sigma > 0, logc_expression, -np.inf) + logc = pt.switch( + 1 + xi * (value - mu) / sigma > 0, logc_expression, pt.switch(xi > 0, -np.inf, 0) + ) return check_parameters( logc, sigma > 0, pt.and_(xi > -1, xi < 1), msg="sigma > 0 or -1 < xi < 1"