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

Make sure data conversion always happens when resampling

parent 2d665092
No related branches found
No related tags found
No related merge requests found
......@@ -1141,9 +1141,9 @@ class Image(Nifti):
ndims = len(shape)
data = self[sliceobj]
data = np.array(data, dtype=dtype, copy=False)
if tuple(data.shape) != tuple(shape):
data = np.array(data, dtype=dtype, copy=False)
zooms = [float(shape[i]) / data.shape[i] for i in range(ndims)]
data = ndimage.zoom(data, zooms, **kwargs)
......
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