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 committed Mar 21, 2024
1 parent 65b81fd commit 262d868
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(

Check warning on line 2091 in pymc/distributions/continuous.py

View check run for this annotation

Codecov / codecov/patch

pymc/distributions/continuous.py#L2091

Added line #L2091 was not covered by tests
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(

Check warning on line 2175 in pymc/distributions/continuous.py

View check run for this annotation

Codecov / codecov/patch

pymc/distributions/continuous.py#L2175

Added line #L2175 was not covered by tests
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(

Check warning on line 2594 in pymc/distributions/continuous.py

View check run for this annotation

Codecov / codecov/patch

pymc/distributions/continuous.py#L2594

Added line #L2594 was not covered by tests
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(

Check warning on line 3154 in pymc/distributions/continuous.py

View check run for this annotation

Codecov / codecov/patch

pymc/distributions/continuous.py#L3154

Added line #L3154 was not covered by tests
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(

Check warning on line 3257 in pymc/distributions/continuous.py

View check run for this annotation

Codecov / codecov/patch

pymc/distributions/continuous.py#L3257

Added line #L3257 was not covered by tests
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(

Check warning on line 3475 in pymc/distributions/continuous.py

View check run for this annotation

Codecov / codecov/patch

pymc/distributions/continuous.py#L3475

Added line #L3475 was not covered by tests
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(

Check warning on line 3825 in pymc/distributions/continuous.py

View check run for this annotation

Codecov / codecov/patch

pymc/distributions/continuous.py#L3825

Added line #L3825 was not covered by tests
res,
sigma > 0,
msg="sigma > 0",
Expand Down

0 comments on commit 262d868

Please sign in to comment.