Skip to content

Commit 216421b

Browse files
committed
fix cifti2 transform loading without newlines
1 parent b8a1039 commit 216421b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

nibabel/cifti2/parse_cifti2.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,8 @@ def flush_chardata(self):
538538
# conversion to numpy array
539539
c = BytesIO(data.strip().encode('utf-8'))
540540
transform = self.struct_state[-1]
541-
transform.matrix = np.loadtxt(c, dtype=np.float64)
541+
matrix = np.loadtxt(c, dtype=np.float64)
542+
transform.matrix = matrix.reshape(4, 4)
542543
c.close()
543544

544545
elif self.write_to == 'Label':

0 commit comments

Comments
 (0)