Skip to content

Incorporates standard for axis validation to array_api/manipulation_functions.py - #4858

Merged
ajpotts merged 1 commit into
Bears-R-Us:mainfrom
drculhane:Closes-4857
Sep 11, 2025
Merged

ajpotts merged 1 commit into
Bears-R-Us:mainfrom
drculhane:Closes-4857

Conversation

@drculhane

@drculhane drculhane commented Sep 5, 2025 •

Copy link
Copy Markdown
Contributor

Addendum

The existing axis checking in array_api moveaxis wasn't correct. It allowed cases numpy doesn't (for example, moving axes (0,1,2) to (1,1,0)). This isn't the same issue as the axis validation, but it was an error, and has been fixed.

Closes #4857

This is part of a series of PRs that will standardize the axis checking (and negative axis handling) in arkouda. This PR specifically finalizes the _axis_validation function in numpy/util.py, and updates all of the axis handling and checking in array_api/manipulation_functions.py.

This PR also adds several fields to the docstrings, and changes the "must have same rank" check in stack to "must have same shape," to match numpy.

@ajpotts ajpotts left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for fixing this!

@1RyanK 1RyanK left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good!

@ajpotts
ajpotts added this pull request to the merge queue Sep 11, 2025
Merged via the queue into Bears-R-Us:main with commit 816dd51 Sep 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update axis validation and checking in array_api/manipulation_functions.py

3 participants