Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT:update boost to fix skewnorm.ppf #20643

Merged
merged 5 commits into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions scipy/stats/tests/test_distributions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4009,6 +4009,12 @@ def optimizer(fun, bounds):
fit_result = stats.fit(stats.skewnorm, x, bounds, optimizer=optimizer)
np.testing.assert_allclose(params, fit_result.params, rtol=1e-4)

def test_ppf(self):
# gh20124 reported that Boost's ppf was wrong for high skewness values
dschmitz89 marked this conversation as resolved.
Show resolved Hide resolved
# Reference CDF value was calculated using
dschmitz89 marked this conversation as resolved.
Show resolved Hide resolved
# CDF[SkewNormalDistribution[0, 1, 500], 0.01] in Wolfram Alpha.
dschmitz89 marked this conversation as resolved.
Show resolved Hide resolved
assert_allclose(stats.skewnorm.ppf(0.01, 500), 0.012533469508013, rtol=1e-13)


class TestExpon:
def test_zero(self):
Expand Down