Commit 8bc6573e authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

Make sure data conversion always happens when resampling

parent 2d665092
......@@ -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)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment