-
Notifications
You must be signed in to change notification settings - Fork 8
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
Ensure compatibility with numpy 2.0 #396
Labels
Comments
phargogh
added a commit
to phargogh/pygeoprocessing
that referenced
this issue
Jun 18, 2024
Builds were failing without this line. RE:natcap#396
phargogh
added a commit
to phargogh/pygeoprocessing
that referenced
this issue
Jun 18, 2024
Numpy 2.0 changed the behavior of numpy.can_cast(): can_cast() was looking at the type of the int, not the value, I guess. Updating to use numpy.result_type definitely uses the scalar value. RE:natcap#396
phargogh
added a commit
to phargogh/pygeoprocessing
that referenced
this issue
Jun 18, 2024
This approach is better - numpy has a function for checking the minimum dtype needed for a scalar value, so we can use that to see if the type can cast correctly. RE:natcap#396
phargogh
added a commit
to phargogh/pygeoprocessing
that referenced
this issue
Jun 18, 2024
GDAL only wants python ints/floats, not numpy ints/floats. RE:natcap#396
phargogh
added a commit
to phargogh/pygeoprocessing
that referenced
this issue
Jun 18, 2024
phargogh
added a commit
to phargogh/pygeoprocessing
that referenced
this issue
Jun 18, 2024
phargogh
added a commit
to phargogh/pygeoprocessing
that referenced
this issue
Jun 19, 2024
…ABIs for testing. RE:natcap#396
phargogh
added a commit
to phargogh/pygeoprocessing
that referenced
this issue
Jun 19, 2024
phargogh
added a commit
to phargogh/pygeoprocessing
that referenced
this issue
Jun 20, 2024
phargogh
added a commit
to phargogh/pygeoprocessing
that referenced
this issue
Jun 20, 2024
phargogh
added a commit
to phargogh/pygeoprocessing
that referenced
this issue
Jun 24, 2024
phargogh
added a commit
to phargogh/pygeoprocessing
that referenced
this issue
Jun 24, 2024
phargogh
added a commit
to phargogh/pygeoprocessing
that referenced
this issue
Jun 27, 2024
phargogh
added a commit
to phargogh/pygeoprocessing
that referenced
this issue
Jun 27, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Numpy 2.0 was just released, and when I install the latest version (
numpy=2.0.0
) into an environment and runpython -m pytest tests
, I'm getting a few failures on my mac:Since this is a major api change, maybe we should expand our test matrix to test against numpy 2.0 if we aren't already?
The text was updated successfully, but these errors were encountered: