Skip to content

Commit e042456

Browse files
committed
FIX: Use newline='' when opening csv for writing
1 parent bb431a5 commit e042456

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nibabel/cmdline/parrec2nii.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ def proc_file(infile, opts):
278278
labels = pr_img.header.get_volume_labels()
279279
if len(labels) > 0:
280280
vol_keys = list(labels.keys())
281-
with open(basefilename + '.ordering.csv', 'w') as csvfile:
281+
with open(basefilename + '.ordering.csv', 'w', newline='') as csvfile:
282282
csvwriter = csv.writer(csvfile, delimiter=',')
283283
csvwriter.writerow(vol_keys)
284284
for vals in zip(*[labels[k] for k in vol_keys]):

0 commit comments

Comments
 (0)