File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -358,8 +358,7 @@ def proc_file(infile, opts):
358
358
)
359
359
with open (basefilename + '.bvals' , 'w' ) as fid :
360
360
# np.savetxt could do this, but it's just a loop anyway
361
- for val in bvals :
362
- fid .write (f'{ val } ' )
361
+ fid .write (' ' .join (str (val ) for val in bvals ) + ' ' )
363
362
fid .write ('\n ' )
364
363
else :
365
364
verbose ('Writing .bvals and .bvecs files' )
@@ -369,13 +368,11 @@ def proc_file(infile, opts):
369
368
bvecs = apply_affine (bv_reorient , bvecs )
370
369
with open (basefilename + '.bvals' , 'w' ) as fid :
371
370
# np.savetxt could do this, but it's just a loop anyway
372
- for val in bvals :
373
- fid .write (f'{ val } ' )
371
+ fid .write (' ' .join (str (val ) for val in bvals ) + ' ' )
374
372
fid .write ('\n ' )
375
373
with open (basefilename + '.bvecs' , 'w' ) as fid :
376
374
for row in bvecs .T :
377
- for val in row :
378
- fid .write (f'{ val } ' )
375
+ fid .write (' ' .join (str (val ) for val in row ) + ' ' )
379
376
fid .write ('\n ' )
380
377
381
378
# export data labels varying along the 4th dimensions if requested
You can’t perform that action at this time.
0 commit comments