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

Array API manipulation functions #2936

Merged
merged 14 commits into from
Feb 13, 2024

Conversation

jeremiah-corrado
Copy link
Contributor

@jeremiah-corrado jeremiah-corrado commented Jan 30, 2024

Implementation of the Array API manipulation functions

Adds implementations of:

  • concat
  • expand_dims
  • flip
  • permute_dims
  • reshape
  • roll
  • squeeze
  • stack

Like broadcasting, reshape and squeeze both create arrays whose rank can/will be different than the array being operated on. As such, these procedures also get compiled for various pairs of supported ranks, which required some modifications to parseServerConfig.py

Tests are added for each of the new functions.

Adds a separate Array API module config file with modules that are only needed for the ArrayAPI.

@jeremiah-corrado jeremiah-corrado marked this pull request as ready for review February 5, 2024 20:47
Copy link
Contributor

@bmcdonald3 bmcdonald3 left a comment

Choose a reason for hiding this comment

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

Not sure I have a ton of feedback, I think the API answering the qeustions of design have those bases covered and the tests look good, so since we are focused on correctness and not performance off the bat, I think this looks good.

I am curious about a few things I mentioned and one other thing I'll say is the amount of param for loops we have is unfortunate, but I understand we need those because of how we are doing the dimensionality, that just really jumped out at me taking a pass over the code.

Looks good 👍

arkouda/array_api/_manipulation_functions.py Show resolved Hide resolved
src/ManipulationMsg.chpl Show resolved Hide resolved
@bmcdonald3 bmcdonald3 added this pull request to the merge queue Feb 13, 2024
Merged via the queue into Bears-R-Us:master with commit d4ac8b3 Feb 13, 2024
13 checks passed
@jeremiah-corrado jeremiah-corrado deleted the array-api-manip-funcs branch February 13, 2024 19:21
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.

2 participants