ubarsc / rios

A raster processing layer on top of GDAL
https://www.rioshome.org
GNU General Public License v3.0
14 stars 7 forks source link

Numpy 2 preparation #80

Closed neilflood closed 3 months ago

neilflood commented 3 months ago

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

neilflood commented 3 months ago

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.