Skip to content

Commit

Permalink
ENH: Construct resampled data array in F order
Browse files Browse the repository at this point in the history
Ensures that each volume is contiguous in memory, which should keep it
more efficient for both writing resampled volumes into the array and
writing the array to disk.
  • Loading branch information
effigies committed Oct 23, 2023
1 parent d2a3d95 commit cf92a48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fmriprep/interfaces/resampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ async def resample_series_async(

semaphore = asyncio.Semaphore(max_concurrent)

out_array = np.zeros(coordinates.shape[1:] + data.shape[-1:], dtype=output_dtype)
out_array = np.zeros(coordinates.shape[1:] + data.shape[-1:], dtype=output_dtype, order='F')

tasks = [
asyncio.create_task(
Expand Down

0 comments on commit cf92a48

Please sign in to comment.