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

BUG: Fix stats.skewnorm.ppf for large skew values #20125

Closed
wants to merge 2 commits into from

Conversation

maresb
Copy link
Contributor

@maresb maresb commented Feb 21, 2024

Reference issue

Closes gh-20124

What does this implement/fix?

Fix an upstream bug in Boost that results in nonsensical results when computing PPF of skewnorm distributions that have large values of skew.

I'm trying to verify my regression test on my fork maresb#3.

@github-actions github-actions bot added scipy.stats scipy._lib defect A clear bug or issue that prevents SciPy from being installed or used as expected labels Feb 21, 2024
@lucascolley
Copy link
Member

x-ref gh-20122

@maresb maresb marked this pull request as draft February 21, 2024 15:59
@maresb
Copy link
Contributor Author

maresb commented Feb 21, 2024

Ah, it's a bit disappointing that upgrading Boost didn't automatically solve gh-20124. But at least the warning message is different.

Now:

RuntimeWarning: Error in function boost::math::quantile(const skew_normal_distribution<d>&, %1%): Unable to locate solution in a reasonable time: either there is no answer to quantile or the answer is infinite.  Current best guess is %1%

Previously:

RuntimeWarning: overflow encountered in _skewnorm_ppf

I may have to chase this one further upstream in Boost.

@maresb
Copy link
Contributor Author

maresb commented May 5, 2024

Superseded by #20643, thanks @dschmitz89!!!

@maresb maresb closed this May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect A clear bug or issue that prevents SciPy from being installed or used as expected scipy.stats
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: stats.skewnorm.ppf returns wrong values with moderately high skew parameters
2 participants