Skip to content

Commit

Permalink
fixing check_parameters occurences in icdf functions, replacing with …
Browse files Browse the repository at this point in the history
…check_icdf_parameters
  • Loading branch information
amyoshino authored and ricardoV94 committed Mar 25, 2024
1 parent f302882 commit abe7bc9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions pymc/distributions/continuous.py
Original file line number Diff line number Diff line change
Expand Up @@ -2088,7 +2088,7 @@ def logcdf(value, alpha, beta):
def icdf(value, alpha, beta):
res = alpha + beta * pt.tan(np.pi * (value - 0.5))
res = check_icdf_value(res, value)
return check_parameters(
return check_icdf_parameters(
res,
beta > 0,
msg="beta > 0",
Expand Down Expand Up @@ -2172,7 +2172,7 @@ def logcdf(value, loc, beta):
def icdf(value, loc, beta):
res = loc + beta * pt.tan(np.pi * (value) / 2.0)
res = check_icdf_value(res, value)
return check_parameters(
return check_icdf_parameters(
res,
beta > 0,
msg="beta > 0",
Expand Down Expand Up @@ -2591,7 +2591,7 @@ def logp(value, alpha, beta):
def icdf(value, alpha, beta):
res = beta * (-pt.log(1 - value)) ** (1 / alpha)
res = check_icdf_value(res, value)
return check_parameters(
return check_icdf_parameters(
res,
alpha > 0,
beta > 0,
Expand Down Expand Up @@ -3151,7 +3151,7 @@ def icdf(value, lower, c, upper):
upper - np.sqrt((upper - lower) * (upper - c) * (1 - value)),
)
res = check_icdf_value(res, value)
return check_parameters(
return check_icdf_parameters(
res,
lower <= c,
c <= upper,
Expand Down Expand Up @@ -3254,7 +3254,7 @@ def logcdf(value, mu, beta):
def icdf(value, mu, beta):
res = mu - beta * pt.log(-pt.log(value))
res = check_icdf_value(res, value)
return check_parameters(
return check_icdf_parameters(
res,
beta > 0,
msg="beta > 0",
Expand Down Expand Up @@ -3472,7 +3472,7 @@ def logcdf(value, mu, s):
def icdf(value, mu, s):
res = mu + s * pt.log(value / (1 - value))
res = check_icdf_value(res, value)
return check_parameters(
return check_icdf_parameters(
res,
s > 0,
msg="s > 0",
Expand Down Expand Up @@ -3822,7 +3822,7 @@ def logcdf(value, mu, sigma):
def icdf(value, mu, sigma):
res = sigma * -pt.log(2.0 * pt.erfcinv(value) ** 2) + mu
res = check_icdf_value(res, value)
return check_parameters(
return check_icdf_parameters(
res,
sigma > 0,
msg="sigma > 0",
Expand Down

0 comments on commit abe7bc9

Please sign in to comment.