Skip to content

Commit

Permalink
STY: ruff, use trailing comma to force reshape to expand
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Jun 5, 2024
1 parent 83d4461 commit 0293a18
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion fmriprep/utils/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ def load_ants_h5(filename: Path) -> nt.base.TransformBase:
shape = tuple(fixed_params[:3].astype(int))
# ITK stores warps in Fortran-order, where the vector components change fastest
# Nitransforms expects 3 volumes, not a volume of three-vectors, so transpose
warp = np.reshape(transform2['TransformParameters'], (3, *shape), order='F').transpose(1, 2, 3, 0)
warp = np.reshape(
transform2['TransformParameters'],
(3, *shape),
order='F',
).transpose(1, 2, 3, 0)
warp *= np.array([-1, -1, 1])

warp_affine = np.eye(4)
Expand Down

0 comments on commit 0293a18

Please sign in to comment.