Repository navigation
Standardizes axis validation and handling in array_api/statistical_functions.py - #4909
Merged
Merged
Conversation
drculhane
force-pushed
the
Closes-4905
branch
from
September 17, 2025 13:36
468e9d4 to
f79bf39
Compare
Contributor
|
From here looks like in the docstring after the description, it's supposed to go Parameters -> Returns -> Raises -> Examples, if we're following numpy. |
1RyanK
approved these changes
Sep 17, 2025
1RyanK
left a comment
Contributor
There was a problem hiding this comment.
Looks good! Maybe just standardize the order of sections in the docstrings.
Contributor
Author
|
I took Ryan's suggestion of standardizing the order of the docstring sections. That's the only change in this latest push. |
ajpotts
reviewed
Sep 19, 2025
ajpotts
approved these changes
Sep 19, 2025
ajpotts
left a comment
Contributor
There was a problem hiding this comment.
Looks great! Thanks for improving this.
drculhane
force-pushed
the
Closes-4905
branch
from
September 22, 2025 12:44
dc01c87 to
7fc9273
Compare
ajpotts
enabled auto-merge
September 22, 2025 14:09
ajpotts
approved these changes
Sep 22, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4905
The primary intent of this PR was to add the new standard axis validation & handling to array_api/statistical_functions.py. Along the way, I noted other issues.
NOTE: some of the functions are just pass-throughs (i.e. no code except for calling another function). In those cases, I've chosen not to check the axis parameter (since the other function has to), nor to include the corresponding errors in the Raises section, even though I may have included Examples. This is purely a judgment call, and I'm open to discussion.