8000 MAINT: fix skellam distribution tests by dschmitz89 · Pull Request #22971 · scipy/scipy · GitHub
[go: up one dir, main page]

Skip to content

MAINT: fix skellam distribution tests #22971

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

Merged
merged 9 commits into from
May 13, 2025

Conversation

dschmitz89
Copy link
Contributor

Reference issue

Closes #22956

What does this implement/fix?

This should help with the recent discrete distribution updates. I do not understand the context fully though. Locally, I still see failures for other distributions.

Long term, it would be better to have a unified wrapping mechanism for boost functions that handle C++ exceptions generally. Let's fight that battle another day though.

@github-actions github-actions bot added scipy.stats scipy.special C/C++ Items related to the internal C/C++ code base maintenance Items related to regular maintenance tasks labels May 11, 2025
Copy link
Contributor
@mdhaber mdhaber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @dschmitz89! The test is skipped as xslow in line 1116, so it's not running in CI. Please remove 'skellam' from the list and this will LGTM, but I hope @steppi or someone can take a quick look at the compiled code.

@mdhaber
Copy link
Contributor
mdhaber commented May 12, 2025

Oops! So it was indeed very slow. Let's see if tests pass otherwise, then we can add skellam back to the list.

@@ -1113,7 +1113,7 @@ def test_rv_generic(self, i, distdata):
'johnsonsb', 'kappa4', 'ksone', 'kstwo', 'kstwobign', 'norminvgauss',
'powerlognorm', 'powernorm', 'recipinvgauss', 'studentized_range',
'vonmises_line', # continuous
'betanbinom', 'zipf', 'logser', 'skellam'} # discrete
'betanbinom', 'zipf', 'logser'} # discrete
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'betanbinom', 'zipf', 'logser'} # discrete
'betanbinom', 'zipf', 'logser', 'skellam'} # discrete

@mdhaber
Copy link
Contributor
mdhaber commented May 13, 2025

Great; everything passed except for the slow test. The suggestion #22971 (review) can be committed with [skip ci] if the compiled code reviewer has no other suggestions.

[skip ci]
@mdhaber mdhaber requested review from ev-br, larsoner and ilayn as code owners May 13, 2025 18:43
@j-bowhay j-bowhay merged commit 21e2553 into scipy:main May 13, 2025
3 of 4 checks passed
@j-bowhay j-bowhay added this to the 1.16.0 milestone May 13, 2025
johnmdusel pushed a commit to johnmdusel/scipy that referenced this pull request May 13, 2025
* TST: add test case extreme input for ncx2 pdf

* TST: remove skellam from makedistribution skip list

* MAINT: catch errors in ncx2 pdf

* TST: Remove skellam from slow list


---------

Co-authored-by: Matt Haberland <mhaberla@calpoly.edu>
@dschmitz89 dschmitz89 deleted the ncx2_pdf_edge_case branch July 19, 2025 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C/C++ Items related to the internal C/C++ code base maintenance Items related to regular maintenance tasks scipy.special scipy.stats
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: special._ufuncs._ncx2_pdf: interpreter crash with extreme input
3 participants
0