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: stats.wilcoxon: fix failure with multidimensional x with NaN and slice length > 50 #20592

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mdhaber
Copy link
Contributor

@mdhaber mdhaber commented Apr 27, 2024

Reference issue

Closes gh-20591

What does this implement/fix?

This fixes a bug in which under specific conditions (x.ndim > 1, x.shape[axis] > 50, np.isnan(x).any(), nan_policy='propagate', and method='auto', for instance) wilcoxon could fail and raise an unexpected error.

@mdhaber mdhaber added scipy.stats maintenance Items related to regular maintenance tasks labels Apr 27, 2024
@mdhaber
Copy link
Contributor Author

mdhaber commented May 6, 2024

@tirthasheshpatel This is a pretty short fix; do you have a moment to take a look before we branch 1.13.1?

@mdhaber mdhaber added this to the 1.13.1 milestone May 6, 2024
@mdhaber mdhaber added the backport-candidate This fix should be ported by a maintainer to previous SciPy versions. label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-candidate This fix should be ported by a maintainer to previous SciPy versions. maintenance Items related to regular maintenance tasks scipy.stats
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: scipy.stats.wilcoxon in 1.13 fails on 2D array with nan -- 1D works
1 participant