-
Notifications
You must be signed in to change notification settings - Fork 5
✨ HasDType, Array #48
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
9b98cc1
to
b8cc51d
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.
sorry if this is premature, but maybe these comments can help 🤷🏻
tests/integration/test_numpy2.pyi
Outdated
@@ -1,11 +1,52 @@ | |||
from typing import Any | |||
# mypy: disable-error-code="no-redef" |
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.
is this needed for the redefinition of _
?
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.
Yes.
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 didn't want to name all the variables.
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.
There are only two hard things in Computer Science: cache invalidation and naming things.
-- Phil Karlton
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.
Or even better:
There are 2 hard problems in computer science: cache invalidation, naming things, and off-by-1 errors.
f203d12
to
5ad0d5c
Compare
3434139
to
0e79721
Compare
numpy 2.0's array_api stuff is infinitely better than 1.0's. It's a real struggle to write tests that both pass and test what we want. 😮💨 |
@jorenham. Ok. this PR was much easier than #32 and hopefully will help with that one, particularly in writing more comprehensive tests. Might go one |
Pushed to add docs to HasArrayNamespace |
Signed-off-by: nstarman <nstarman@users.noreply.github.com>
Signed-off-by: nstarman <nstarman@users.noreply.github.com>
Forgot to have Array inherit from HasArrayNamespace. That's kind of the most important one 😆 |
Ok. @jorenham now it should really be ready for a review. |
Maybe we could use array-api-compat for numpy<2.0? |
That's a good idea. After this PR because things are passing? |
Yea, I'll get on that soon (after I fix optype and scipy-stubs apparently being broken on |
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.
should be good to merge
Relies on #47A new PR to precede #32.