silx-kit / fabio

I/O library for images produced by 2D X-ray detector
Other
57 stars 52 forks source link

Compatibility with numpy 2.0 #555

Closed kif closed 6 months ago

kif commented 6 months ago

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.