Fix NumPy 2 incompatibility by bumping matplotlib pin#18
Open
RS-ins wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Follow-up to #17.
After the NumPy 2 compatibility fixes were merged, the CI (Git Actions) build on main started failing at the pytest step (exit code 2 — a collection error, before any test runs).
Cause: #17 relaxed the numpy<2.0.0 pin, so CI now resolves NumPy 2.x on Python 3.10. But requirements.txt still pinned matplotlib==3.5.1, which was based on NumPy 1.x.
Under NumPy 2 the matplotlib import raises the "compiled using NumPy 1.x cannot be run in NumPy 2.x" error.
Fix: Bump the pin to matplotlib>=3.8.4, the first release with wheels ABI-compatible with both NumPy 1.x and 2.x (still supports Python 3.10).
Local testing: New virtual env on Python 3.10 replicating the CI install steps; resolves to numpy 2.2.6 + matplotlib 3.10.9, and the full suite passes (31 passed).