-
Notifications
You must be signed in to change notification settings - Fork 52
PR: Add meshgrid #145
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
PR: Add meshgrid #145
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @steff456. Overall looks good, a few comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking that it may not be obvious enough what this function does exactly. There's many functions where we don't have extensive notes, but in this case it seems justified to add the pseudo-code for indexing (like in the Notes section of the numpy.meshgrid docstring).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@steff456 Thanks for working on this! In my review, I mainly suggested changes to ensure consistency with the rest of spec (formatting, language, etc). I also propose consolidating some of the notes and special cases into the parameter and return value descriptions directly. Let me know if you have any questions!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
0607525
to
138e963
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR
meshgrid
, which returns coordinate matrices from coordinate vectors.Notes
copy
andsparse
currently supported in NumPy, CuPy and JAX were dropped (https://github.com/data-apis/array-api-comparison/blob/main/signatures/creation/meshgrid.md)indexing
is based in the current implementation of NumPy including it's special cases for 0-D and 1-D arrays.