Skip to content
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

Numpy 2 preparation #80

Closed
neilflood opened this issue May 24, 2024 · 1 comment · Fixed by #81
Closed

Numpy 2 preparation #80

neilflood opened this issue May 24, 2024 · 1 comment · Fixed by #81

Comments

@neilflood
Copy link
Member

neilflood commented May 24, 2024

Just remembered to start checking for changes in preparation for numpy-2.0. Their projected release date is 2024-06-16.

This is just a list, as I find things.

According to gdal.org it appears that GDAL already supports it, so we should be ready ahead of time.

Numpy 2.0 release notes
Migration guide

  • numpy.cast. Use np.asarray(arr, dtype=dtype) instead. This is needed in readerinfo.py.
@neilflood
Copy link
Member Author

I just ran a check with ruff, as per the migration guide instructions

$ ruff check . --select NPY201
rios/readerinfo.py:400:23: NPY201 `np.cast` will be removed in NumPy 2.0. Use `np.asarray(arr, dtype=dtype)` instead.
Found 1 error.

It did not find anything else, so I will proceed with a PR to correct this one thing.

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 a pull request may close this issue.

1 participant