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

BUG: fix incompatibilities with NumPy 2.1 #512

Merged
merged 3 commits into from
Aug 22, 2024

Conversation

neutrinoceros
Copy link
Member

  • BUG: test/implement array functions new in NumPy 2.1 (np.cumulative_sum and np.cumulative_prod)
  • BUG: adapt np.clip's implementation signature at runtime

example logs
xref: numpy/numpy#26724

@neutrinoceros neutrinoceros marked this pull request as ready for review July 3, 2024 09:29
@neutrinoceros
Copy link
Member Author

Normal CI is affected now that NumPy 2.1 is out (though it is not the only issue)
@jzuhone ?

@neutrinoceros neutrinoceros changed the title BUG: fix new incompatibilities with NumPy 2.1 BUG: fix incompatibilities with array API 2023.12 (NumPy 2.1) Aug 19, 2024
@neutrinoceros neutrinoceros changed the title BUG: fix incompatibilities with array API 2023.12 (NumPy 2.1) BUG: fix incompatibilities with NumPy 2.1 Aug 19, 2024
Comment on lines +272 to +273
>>> with np.printoptions(precision=4):
... print([1.123456789]*u.km)
Copy link
Member Author

Choose a reason for hiding this comment

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

the reason this fix is needed is that the repr of np.set_printoptions's return value is not empty in numpy 2.1, which caused this test to fail and leak side effects, causing a lot other tests to fail too.

@jzuhone jzuhone merged commit a579019 into yt-project:main Aug 22, 2024
9 checks passed
@neutrinoceros neutrinoceros deleted the compat/numpy21 branch August 22, 2024 13:46
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.

None yet

2 participants