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

Compatibility with numpy 2.0 #555

Closed
kif opened this issue Mar 15, 2024 · 0 comments · Fixed by #556
Closed

Compatibility with numpy 2.0 #555

kif opened this issue Mar 15, 2024 · 0 comments · Fixed by #556
Assignees

Comments

@kif
Copy link
Member

kif commented Mar 15, 2024

There is a simple part:

lintaillefer:~/workspace/fabio % ruff check src --select NPY201
src/fabio/app/eiger2crysalis.py:404:23: NPY201 `np.cast` will be removed in NumPy 2.0. Use `np.asarray(arr, dtype=dtype)` instead.
src/fabio/cbfimage.py:248:23: NPY201 [*] `np.string_` will be removed in NumPy 2.0. Use `numpy.bytes_` instead.
src/fabio/cbfimage.py:297:25: NPY201 [*] `np.string_` will be removed in NumPy 2.0. Use `numpy.bytes_` instead.
src/fabio/cbfimage.py:299:25: NPY201 [*] `np.string_` will be removed in NumPy 2.0. Use `numpy.bytes_` instead.
src/fabio/cbfimage.py:302:25: NPY201 [*] `np.string_` will be removed in NumPy 2.0. Use `numpy.bytes_` instead.
src/fabio/cbfimage.py:303:25: NPY201 [*] `np.string_` will be removed in NumPy 2.0. Use `numpy.bytes_` instead.
src/fabio/cbfimage.py:304:25: NPY201 [*] `np.string_` will be removed in NumPy 2.0. Use `numpy.bytes_` instead.
src/fabio/cbfimage.py:357:12: NPY201 [*] `np.string_` will be removed in NumPy 2.0. Use `numpy.bytes_` instead.
src/fabio/cbfimage.py:358:14: NPY201 [*] `np.string_` will be removed in NumPy 2.0. Use `numpy.bytes_` instead.
src/fabio/cbfimage.py:359:20: NPY201 [*] `np.string_` will be removed in NumPy 2.0. Use `numpy.bytes_` instead.
src/fabio/cbfimage.py:360:20: NPY201 [*] `np.string_` will be removed in NumPy 2.0. Use `numpy.bytes_` instead.
src/fabio/cbfimage.py:361:18: NPY201 [*] `np.string_` will be removed in NumPy 2.0. Use `numpy.bytes_` instead.
src/fabio/cbfimage.py:362:11: NPY201 [*] `np.string_` will be removed in NumPy 2.0. Use `numpy.bytes_` instead.
src/fabio/cbfimage.py:364:21: NPY201 [*] `np.string_` will be removed in NumPy 2.0. Use `numpy.bytes_` instead.
src/fabio/cbfimage.py:365:12: NPY201 [*] `np.string_` will be removed in NumPy 2.0. Use `numpy.bytes_` instead.
src/fabio/cbfimage.py:366:12: NPY201 [*] `np.string_` will be removed in NumPy 2.0. Use `numpy.bytes_` instead.
src/fabio/cbfimage.py:368:20: NPY201 [*] `np.string_` will be removed in NumPy 2.0. Use `numpy.bytes_` instead.
src/fabio/cbfimage.py:369:12: NPY201 [*] `np.string_` will be removed in NumPy 2.0. Use `numpy.bytes_` instead.
src/fabio/cbfimage.py:370:14: NPY201 [*] `np.string_` will be removed in NumPy 2.0. Use `numpy.bytes_` instead.
src/fabio/cbfimage.py:371:12: NPY201 [*] `np.string_` will be removed in NumPy 2.0. Use `numpy.bytes_` instead.
src/fabio/cbfimage.py:372:12: NPY201 [*] `np.string_` will be removed in NumPy 2.0. Use `numpy.bytes_` instead.
src/fabio/cbfimage.py:419:28: NPY201 [*] `np.string_` will be removed in NumPy 2.0. Use `numpy.bytes_` instead.
src/fabio/cbfimage.py:457:21: NPY201 [*] `np.string_` will be removed in NumPy 2.0. Use `numpy.bytes_` instead.
src/fabio/cbfimage.py:459:21: NPY201 [*] `np.string_` will be removed in NumPy 2.0. Use `numpy.bytes_` instead.
src/fabio/cbfimage.py:463:48: NPY201 [*] `np.string_` will be removed in NumPy 2.0. Use `numpy.bytes_` instead.
src/fabio/cbfimage.py:538:38: NPY201 [*] `np.string_` will be removed in NumPy 2.0. Use `numpy.bytes_` instead.
src/fabio/cbfimage.py:555:38: NPY201 [*] `np.string_` will be removed in NumPy 2.0. Use `numpy.bytes_` instead.
src/fabio/cbfimage.py:597:34: NPY201 [*] `np.string_` will be removed in NumPy 2.0. Use `numpy.bytes_` instead.
src/fabio/eigerimage.py:187:45: NPY201 [*] `np.NaN` will be removed in NumPy 2.0. Use `numpy.nan` instead.
src/fabio/sparseimage.py:186:30: NPY201 [*] `np.NaN` will be removed in NumPy 2.0. Use `numpy.nan` instead.
Found 30 errors.

And a more complicated one with the cython extensions (some of them explicitely depend on numpy at the C-level.

@kif kif self-assigned this Mar 15, 2024
@kif kif mentioned this issue Mar 15, 2024
@kif kif closed this as completed in #556 Mar 15, 2024
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