Skip to content

Commit

Permalink
patch np1.20.0 deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasHoffmann77 committed Dec 4, 2024
1 parent 90ee19c commit 25dbff0
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Thomas Hoffmann, EMBL Heidelberg, [email protected]
# 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)

0 comments on commit 25dbff0

Please sign in to comment.