Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Support for NumPy 2.0 in Neo Core #1490
base: master
Are you sure you want to change the base?
Support for NumPy 2.0 in Neo Core #1490
Changes from 26 commits
a50e343
f9fb7ec
5cf94d4
9f0c35e
dec7667
088a26b
5b5c6c0
24f0e63
3bcbe1c
a22c61b
5dc0dc8
119e715
b27f880
c9113f6
11d9d72
0160830
10605e3
559b739
34771c7
08d9a2e
18cf5ea
f36daa8
8e6c3d4
b67684b
7154a18
8df5dae
d360787
12cdec9
b6d6bb8
a3b753b
2743cdf
f4545c2
4b0fc8e
7d83da0
5930673
d8edd68
5209596
9a1962b
7449082
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
only actual change to code base. numpy 2.0 returns this as a
np.str_
thing rather than as the actual string. Usingset
instead ofnp.unique
returns the string both >2.0 and < 2.0 for NumPy. Maybe a slight performance hit, but probably not too bad since the annotations should be small either way and this is in a list and not array.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.
Based on discussion with Sam my comment may not have been clear enough. The problem is that
1* pq.ms is at baseline at
'float64'
and as of numpy 2.0+ everything is up-cast to the bigger dtype even if not necessarily. So in old versions of our testtimes
would remain afloat32
, but with new versions of numpy make it into a'float64'
. I did the astype to keep our original idea explict, but we could think of other rewrites of this test to maintain the dtype test.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 change is necessary because as of numpy 2.0 because numpy assert_array_equal actually checks that the quantities are the same which leads to a units issue. If someone else understands this better please post here.
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 is annoying @apdavison any comments ?