Skip to content
Snippets Groups Projects
Commit 48b09f65 authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

MNT: Silence numpy deprecation warnings

parent bed22ace
No related branches found
No related tags found
No related merge requests found
......@@ -733,7 +733,7 @@ def isValidFancySliceObj(sliceobj, shape):
# We only support boolean numpy arrays
# which have the same shape as the image
return (isinstance(sliceobj, np.ndarray) and
sliceobj.dtype == np.bool and
sliceobj.dtype == bool and
np.prod(sliceobj.shape) == np.prod(shape))
......
......@@ -701,7 +701,7 @@ def calcVertexNormals(vertices, indices, fnormals):
the mesh.
"""
vnormals = np.zeros((vertices.shape[0], 3), dtype=np.float)
vnormals = np.zeros((vertices.shape[0], 3), dtype=float)
# TODO make fast. I can't figure
# out how to use np.add.at to
......
......@@ -627,8 +627,8 @@ def rescale(oldShape, newShape, origin=None):
if origin is None:
origin = 'centre'
oldShape = np.array(oldShape, dtype=np.float)
newShape = np.array(newShape, dtype=np.float)
oldShape = np.array(oldShape, dtype=float)
newShape = np.array(newShape, dtype=float)
ndim = len(oldShape)
if len(oldShape) != len(newShape):
......
......@@ -209,7 +209,7 @@ def resample(image,
np.all(np.isclose(matrix, np.eye(len(newShape) + 1))):
return data, image.voxToWorldMat
newShape = np.array(np.round(newShape), dtype=np.int)
newShape = np.array(np.round(newShape), dtype=int)
# Apply smoothing if requested,
# and if not using nn interp
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment