File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ async def _apply_serial(
108
108
semaphore = asyncio .Semaphore (max_concurrent )
109
109
110
110
for t in range (n_resamplings ):
111
- xfm_t = transform if n_resamplings == 1 else transform [t ]
111
+ xfm_t = transform if ( n_resamplings == 1 or transform . ndim < 4 ) else transform [t ]
112
112
113
113
if targets is None :
114
114
targets = ImageGrid (spatialimage ).index ( # data should be an image
@@ -270,7 +270,7 @@ def apply(
270
270
# Order F ensures individual volumes are contiguous in memory
271
271
# Also matches NIfTI, making final save more efficient
272
272
resampled = np .zeros (
273
- (len (ref_ndcoords ), len ( transform ) ), dtype = input_dtype , order = "F"
273
+ (len (ref_ndcoords ), n_resamplings ), dtype = input_dtype , order = "F"
274
274
)
275
275
276
276
resampled = asyncio .run (
You can’t perform that action at this time.
0 commit comments