-
Notifications
You must be signed in to change notification settings - Fork 427
Add Python module support for multi-dimensional arrays #26940
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
Conversation
6de1cea
to
67fe9c4
Compare
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
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.
Let's make the PR description a bit more extensive :)
Overall this seems like a great improvement and I'm excited to see the feature get merged. I've got some comments inline, some are minor, some are more important, and some are probably just questions for my own understanding.
test/library/packages/Python/correctness/arrays/arrayErrors.7.good
Outdated
Show resolved
Hide resolved
test/library/packages/Python/correctness/arrays/arrayErrors.prediff
Outdated
Show resolved
Hide resolved
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]> remove wchar Signed-off-by: Jade Abraham <[email protected]> fix char handling Signed-off-by: Jade Abraham <[email protected]> add array types test case Signed-off-by: Jade Abraham <[email protected]>
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.
Sweet, I think this is good to go!
Hooray! |
Adds Python module support for passing multi-dimensional Chapel arrays by reference and receiving multi-dimensional Python arrays. This is done by expanding our usage of the Python array buffer protocol, both as a producer (Chapel arrays by ref) and as a consumer (PyArray).
This PR contains a number of additional fixes for issues I found along the way, including some portability issues. I also updated some tests (bs4) to be cleaner and use nicer syntax.
start_test test/library/packages/Python
with COMM=nonestart_test test/library/packages/Python
with COMM=gasnetstart_test test/library/packages/Python --memLeaks
with COMM=noneFuture Work (#27073):
np.asarray
first, and then index the numpy view of the Chapel array[Reviewed by @lydia-duncan]