Skip to content

Update get_default_fill_value to be compatible with numpy >=2.0.0 #35

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

Merged
merged 3 commits into from
Nov 20, 2024

Conversation

mattgoalen
Copy link
Contributor

Silent truncation of values is no longer supported in the newest numpy versions (see NEP 50 ).

numpy.uint8(-1) has therefore been replaced with numpy.iinfo(numpy.uint8).max in get_default_fill_value, and further related modifications were made. The constraint on netcdf4 was there to constrain the numpy version to <2.0.0 and is therefore no longer required and has been removed.

@mattgoalen mattgoalen requested a review from shunt16 November 20, 2024 17:43
Copy link
Collaborator

@shunt16 shunt16 left a comment

Choose a reason for hiding this comment

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

Fabulous @mattgoalen - thank you!

@shunt16 shunt16 merged commit bcbc2ac into main Nov 20, 2024
4 checks passed
@mattgoalen mattgoalen deleted the type_fixes branch November 21, 2024 09:51
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.

2 participants