Skip to content

Commit

Permalink
Deal with Numpy alltrue deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
ymzayek committed Sep 20, 2023
1 parent 70da7b7 commit 47c42c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nilearn/plotting/find_cuts.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def find_cut_slices(img, direction="z", n_cuts=7, spacing="auto"):
axis = "xyz".index(direction)
img = check_niimg_3d(img)
affine = img.affine
if not np.alltrue(np.diag(affine)[:3]):
if not np.all(np.diag(affine)[:3]):
warnings.warn(
"A non-diagonal affine is found in the given "
"image. Reordering the image to get diagonal affine "
Expand Down

0 comments on commit 47c42c0

Please sign in to comment.