From a0862c6c08e5fdee1e65cf1559e41388ed964859 Mon Sep 17 00:00:00 2001 From: Paul McCarthy <pauldmccarthy@gmail.com> Date: Tue, 23 Feb 2021 19:29:52 +0000 Subject: [PATCH] MNT: Numpy deprecation warnings --- fsl/data/mesh.py | 2 +- fsl/transform/nonlinear.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fsl/data/mesh.py b/fsl/data/mesh.py index b31e101e4..41aee3542 100644 --- a/fsl/data/mesh.py +++ b/fsl/data/mesh.py @@ -573,7 +573,7 @@ class Mesh(notifier.Notifier, meta.Meta): # sort by ray. I'm Not sure if this is # needed - does trimesh do it for us? - rayIdxs = np.asarray(np.argsort(rays), np.int) + rayIdxs = np.asarray(np.argsort(rays)) locs = locs[rayIdxs] tris = tris[rayIdxs] diff --git a/fsl/transform/nonlinear.py b/fsl/transform/nonlinear.py index 74788a3dc..7a9b8e786 100644 --- a/fsl/transform/nonlinear.py +++ b/fsl/transform/nonlinear.py @@ -280,7 +280,7 @@ class DeformationField(NonLinearTransform): # Mask out the coordinates # that are out of bounds of # the deformation field - voxels = np.round(voxels).astype(np.int) + voxels = np.round(voxels).astype(np.int32) voxmask = (voxels >= [0, 0, 0]) & (voxels < self.shape[:3]) voxmask = voxmask.all(axis=1) voxels = voxels[voxmask] @@ -508,9 +508,9 @@ class CoefficientField(NonLinearTransform): u = np.remainder(i, 1) v = np.remainder(j, 1) w = np.remainder(k, 1) - i = np.floor(i).astype(np.int) - j = np.floor(j).astype(np.int) - k = np.floor(k).astype(np.int) + i = np.floor(i).astype(np.int32) + j = np.floor(j).astype(np.int32) + k = np.floor(k).astype(np.int32) disps = np.zeros(coords.shape) -- GitLab