Skip to content

fix: numpy 2.3 compatibility#3534

Merged
pfackeldey merged 2 commits intomainfrom
ikrommyd/numpy-2.3-compatibility
Jun 11, 2025
Merged

fix: numpy 2.3 compatibility#3534
pfackeldey merged 2 commits intomainfrom
ikrommyd/numpy-2.3-compatibility

Conversation

@ikrommyd
Copy link
Copy Markdown
Collaborator

@ikrommyd ikrommyd commented Jun 11, 2025

Fixes #3530
Supersedes #3531

Fixes np.count_nonzero returning a numpy integer instead of a python integer in numpy 2.3 and also ignores the warning/error of setting rtol or atol to nan or np.inf in np.testing.assert_allclose that is also new in numpy 2.3.

The numexpr pin is temporary to make the ci pass. The numexpr 2.11 compatibility will be fixed in a separate PR.

Copy link
Copy Markdown
Collaborator

@pfackeldey pfackeldey left a comment

Choose a reason for hiding this comment

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

Thanks this looks good to me!

@pfackeldey pfackeldey merged commit 17b2b62 into main Jun 11, 2025
44 checks passed
@pfackeldey pfackeldey deleted the ikrommyd/numpy-2.3-compatibility branch June 11, 2025 16:34
@ianna ianna restored the ikrommyd/numpy-2.3-compatibility branch June 12, 2025 08:56
ianna added a commit that referenced this pull request Jun 12, 2025
ianna added a commit that referenced this pull request Jun 12, 2025
Revert "fix: numpy 2.3 compatibility (#3534)"

This reverts commit 17b2b62.
Copy link
Copy Markdown
Member

@ianna ianna left a comment

Choose a reason for hiding this comment

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

@ikrommyd - I noticed that none of the requests in #3531 was addressed here.

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.

Support NumPy 2.3

3 participants