From 25dbff087180e22e074d81298497f9f1c0ce7505 Mon Sep 17 00:00:00 2001 From: thoffman Date: Wed, 4 Dec 2024 11:17:07 +0100 Subject: [PATCH] patch np1.20.0 deprecation --- ...yoCARE-0.3.1_fix_np1.20.0deprecations.patch | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 easybuild/easyconfigs/c/cryoCARE/cryoCARE-0.3.1_fix_np1.20.0deprecations.patch diff --git a/easybuild/easyconfigs/c/cryoCARE/cryoCARE-0.3.1_fix_np1.20.0deprecations.patch b/easybuild/easyconfigs/c/cryoCARE/cryoCARE-0.3.1_fix_np1.20.0deprecations.patch new file mode 100644 index 00000000000..7be1c194054 --- /dev/null +++ b/easybuild/easyconfigs/c/cryoCARE/cryoCARE-0.3.1_fix_np1.20.0deprecations.patch @@ -0,0 +1,18 @@ +# Thomas Hoffmann, EMBL Heidelberg, structures-it@embl.de +# cryoCARE has requirement numpy ~1.19.2, but we are using newer with SciPy-bundle +# numpy.bool is deprecated sind v 1.20.0: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations. +diff -ru cryoCARE_pip-0.3.1/cryocare/internals/CryoCAREDataModule.py cryoCARE_pip-0.3.1_fix_np1.20.0deprecations/cryocare/internals/CryoCAREDataModule.py +--- cryoCARE_pip-0.3.1/cryocare/internals/CryoCAREDataModule.py 2023-12-11 10:19:20.000000000 +0100 ++++ cryoCARE_pip-0.3.1_fix_np1.20.0deprecations/cryocare/internals/CryoCAREDataModule.py 2024-12-04 10:49:42.527101697 +0100 +@@ -121,9 +121,9 @@ + + # If no mask is specified, just create a one-mask + if mask_path is None: +- mask = np.ones(even.data.shape).astype(np.bool) ++ mask = np.ones(even.data.shape).astype(np.bool_) + else: +- mask = mrcfile.read(mask_path).astype(np.bool) ++ mask = mrcfile.read(mask_path).astype(np.bool_) + + assert even.data.shape == mask.data.shape, '{} and {} tomogram / mask have different shapes.'.format(even_path, + mask_path)