Skip to content

migration to numpy>=2.0 #311

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

Open
clausmichele opened this issue Jan 8, 2025 · 2 comments
Open

migration to numpy>=2.0 #311

clausmichele opened this issue Jan 8, 2025 · 2 comments

Comments

@clausmichele
Copy link
Member

I started checking how to migrate to the latest numpy version. I'm following the official migration guide.

First step - check what we need to modify:

$ ruff openeo_processes_dask/process_implementations/ --select NPY201
warning: `ruff <path>` is deprecated. Use `ruff check <path>` instead.
openeo_processes_dask/process_implementations/comparison.py:29:8: NPY201 [*] `np.issubsctype` will be removed in NumPy 2.0. Use `numpy.issubdtype` instead.
openeo_processes_dask/process_implementations/comparison.py:59:8: NPY201 [*] `np.issubsctype` will be removed in NumPy 2.0. Use `numpy.issubdtype` instead.
openeo_processes_dask/process_implementations/comparison.py:59:47: NPY201 [*] `np.issubsctype` will be removed in NumPy 2.0. Use `numpy.issubdtype` instead.
openeo_processes_dask/process_implementations/comparison.py:65:10: NPY201 [*] `np.issubsctype` will be removed in NumPy 2.0. Use `numpy.issubdtype` instead.
openeo_processes_dask/process_implementations/comparison.py:65:48: NPY201 [*] `np.issubsctype` will be removed in NumPy 2.0. Use `numpy.issubdtype` instead.
openeo_processes_dask/process_implementations/comparison.py:68:10: NPY201 [*] `np.issubsctype` will be removed in NumPy 2.0. Use `numpy.issubdtype` instead.
openeo_processes_dask/process_implementations/comparison.py:68:51: NPY201 [*] `np.issubsctype` will be removed in NumPy 2.0. Use `numpy.issubdtype` instead.
openeo_processes_dask/process_implementations/comparison.py:70:16: NPY201 [*] `np.issubsctype` will be removed in NumPy 2.0. Use `numpy.issubdtype` instead.
openeo_processes_dask/process_implementations/comparison.py:72:16: NPY201 [*] `np.issubsctype` will be removed in NumPy 2.0. Use `numpy.issubdtype` instead.
openeo_processes_dask/process_implementations/comparison.py:76:10: NPY201 [*] `np.issubsctype` will be removed in NumPy 2.0. Use `numpy.issubdtype` instead.
openeo_processes_dask/process_implementations/comparison.py:76:51: NPY201 [*] `np.issubsctype` will be removed in NumPy 2.0. Use `numpy.issubdtype` instead.
openeo_processes_dask/process_implementations/utils.py:8:16: NPY201 `np.obj2sctype` will be removed without replacement in NumPy 2.0
Found 12 errors.
[*] 11 fixable with the `--fix` option.
@clausmichele
Copy link
Member Author

clausmichele commented Jan 8, 2025

Blocking stone: dask-geopandas doesn't support numpy>2.0, since it depends on pyarrow which again doesn't support yet numpy>2.0.

@ValentinaHutter
Copy link
Collaborator

Thanks for investigating! For now, I added the numpy<2.0 dependency to the pyproject.toml as suggested here: #310 (just for reference)

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

No branches or pull requests

2 participants