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(
108108 semaphore = asyncio .Semaphore (max_concurrent )
109109
110110 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 ]
112112
113113 if targets is None :
114114 targets = ImageGrid (spatialimage ).index ( # data should be an image
@@ -270,7 +270,7 @@ def apply(
270270 # Order F ensures individual volumes are contiguous in memory
271271 # Also matches NIfTI, making final save more efficient
272272 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"
274274 )
275275
276276 resampled = asyncio .run (
You can’t perform that action at this time.
0 commit comments