Skip to content

Add pytest conftest.py file to suppress warnings with NumPy 2.0#3307

Merged
seisman merged 4 commits intomainfrom
numpy2.0
Jul 2, 2024
Merged

Add pytest conftest.py file to suppress warnings with NumPy 2.0#3307
seisman merged 4 commits intomainfrom
numpy2.0

Conversation

@seisman
Copy link
Member

@seisman seisman commented Jul 2, 2024

Workaround from #2628 (comment).

Fixes #2628.

@seisman seisman added maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog needs review This PR has higher priority and needs review. labels Jul 2, 2024
@seisman seisman added this to the 0.13.0 milestone Jul 2, 2024
@seisman
Copy link
Member Author

seisman commented Jul 2, 2024

/format

Comment on lines +8 to +9
# Keep this until we require numpy to be >=2.0
# Address https://github.com/GenericMappingTools/pygmt/issues/2628.
Copy link
Member

@weiji14 weiji14 Jul 2, 2024

Choose a reason for hiding this comment

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

What do we do though once we require numpy>=2.0 in June 2026?

Copy link
Member Author

Choose a reason for hiding this comment

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

At that time, this file can be removed and we just need to update the doctests to match the numpy 2.0 behavior.

Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
@seisman seisman merged commit 215e4a1 into main Jul 2, 2024
@seisman seisman deleted the numpy2.0 branch July 2, 2024 09:04
@seisman seisman removed the needs review This PR has higher priority and needs review. label Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failing doctest on pygmt.clib.conversion.dataarray_to_matrix with NumPy 2.0

4 participants