Skip to content

Commit 3a8a2fa

Browse files
committed
fix too long lines
1 parent 3d93a9c commit 3a8a2fa

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

fmriprep/interfaces/itk.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,7 @@ class Volreg2ITK(SimpleInterface):
9999
def _run_interface(self, runtime):
100100
# Load AFNI mat entries and append (0, 0, 0, 1) for homogeneous coordinates
101101
orig_afni_mat = np.loadtxt(self.inputs.in_file)
102-
afni_affines = [np.vstack((orig_afni_mat[i, :].reshape(3, 4, order='C'), [0, 0, 0, 1]))
103-
for i in range(orig_afni_mat.shape[0])]
102+
afni_affines = [mat.reshape(3, 4, order='C') for mat in orig_afni_mat]
104103

105104
out_file = Path(fname_presuffix(self.inputs.in_file,
106105
suffix='_mc4d_itk.txt', newpath=runtime.cwd))
@@ -111,8 +110,9 @@ def _run_interface(self, runtime):
111110
lines.append("#Transform %d" % i)
112111
lines.append("Transform: AffineTransform_double_3_3")
113112

114-
ants_affine_2d = np.hstack((affine[:3, :3].reshape(1, -1), affine[:3, 3].reshape(1, -1)))
115-
params = ants_affine_2d.reshape(-1, 1).astype('float64')
113+
ants_affine_2d = np.hstack((affine[:3, :3].reshape(1, -1),
114+
affine[:3, 3].reshape(1, -1)))
115+
params = ants_affine_2d.reshape(-1).astype('float64')
116116
params_list = ["%g" % i for i in params.tolist()]
117117
lines.append("Parameters: %s" % ' '.join(params_list))
118118
lines.append(fixed_params)

fmriprep/workflows/bold/hmc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"""
1111

1212
from nipype.pipeline import engine as pe
13-
from nipype.interfaces import utility as niu, fsl, afni
13+
from nipype.interfaces import utility as niu, afni
1414
from niworkflows.interfaces import NormalizeMotionParams
1515
from ...interfaces import Volreg2ITK
1616
from ...engine import Workflow

0 commit comments

Comments
 (0)