Skip to content

Commit

Permalink
Merge pull request #11 from PJ-Watson/numpy2.0
Browse files Browse the repository at this point in the history
Fix numpy 2.0 compatibility
  • Loading branch information
aboucaud authored Sep 16, 2024
2 parents 80a142c + 27975e3 commit 742e3c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pypher/pypher.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def trim(image, shape):
shape = np.asarray(shape, dtype=int)
imshape = np.asarray(image.shape, dtype=int)

if np.alltrue(imshape == shape):
if np.all(imshape == shape):
return image

if np.any(shape <= 0):
Expand Down Expand Up @@ -236,7 +236,7 @@ def zero_pad(image, shape, position='corner'):
shape = np.asarray(shape, dtype=int)
imshape = np.asarray(image.shape, dtype=int)

if np.alltrue(imshape == shape):
if np.all(imshape == shape):
return image

if np.any(shape <= 0):
Expand Down

0 comments on commit 742e3c9

Please sign in to comment.