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.gstd: return result rather than raising #20696

Merged
merged 3 commits into from May 25, 2024

Conversation

mdhaber
Copy link
Contributor

@mdhaber mdhaber commented May 11, 2024

Reference issue

gh-20285

What does this implement/fix?

gh-20285 noted changes to stats.gstd that would make it more amenable to the addition of array API support. This implements those changes. It also deprecates support for masked arrays, since gstd seems to be unique among stats functions in that it advertises support for masked arrays such that it returns a masked array with no masked elements (many handle them, but other functions return regular arrays).

Additional information

See #20285 (comment) for context and additional rationale.

@mdhaber mdhaber added scipy.stats maintenance Items related to regular maintenance tasks deprecated Items related to behavior that has been deprecated labels May 11, 2024
Copy link
Member

@Kai-Striega Kai-Striega left a comment

Choose a reason for hiding this comment

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

Looks good to me, a quick comment and a question as review comments, those shouldn't block anything.

I'll make a post to the mailing list today.

scipy/stats/_stats_py.py Show resolved Hide resolved
scipy/stats/tests/test_stats.py Outdated Show resolved Hide resolved
scipy/stats/_stats_py.py Outdated Show resolved Hide resolved
@Kai-Striega
Copy link
Member

@mdhaber We've had two approvals on the mailing list and the failures on the CI are unrelated. Would you like to add anything before I give it a final review?

@mdhaber
Copy link
Contributor Author

mdhaber commented May 16, 2024

Besides the suggestions, nope. Feel free to commit those before merge.

@mdhaber mdhaber requested a review from Kai-Striega May 19, 2024 18:48
Copy link
Member

@Kai-Striega Kai-Striega left a comment

Choose a reason for hiding this comment

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

Changes lgtm, I've merged in your changes. If they pass the test suite, I'll merge this today / tomorrow.

@mdhaber mdhaber added this to the 1.14.0 milestone May 25, 2024
@mdhaber
Copy link
Contributor Author

mdhaber commented May 25, 2024

Looks like CI is happy. I took the liberty of assuming this would make it and adding a release note.

@Kai-Striega Kai-Striega merged commit a524c60 into scipy:main May 25, 2024
31 checks passed
@Kai-Striega
Copy link
Member

Merged, thanks for your work @mdhaber!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecated Items related to behavior that has been deprecated maintenance Items related to regular maintenance tasks scipy.stats
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants