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 4, 2024
1 parent 44bf370 commit a28212d
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(

Check warning on line 77 in fmriprep/utils/transforms.py

View check run for this annotation

Codecov / codecov/patch

fmriprep/utils/transforms.py#L77

Added line #L77 was not covered by tests
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 a28212d

Please sign in to comment.