Skip to content

Commit 3a1a94b

Browse files
Replaces atleast_1d with 'ndmin' keyword in loadtxt
1 parent 33d061f commit 3a1a94b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nibabel/cifti2/parse_cifti2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ def flush_chardata(self):
517517
# conversion to numpy array
518518
c = BytesIO(data.strip().encode('utf-8'))
519519
vertices = self.struct_state[-1]
520-
vertices.extend(np.atleast_1d(np.loadtxt(c, dtype=np.int)))
520+
vertices.extend(np.loadtxt(c, dtype=np.int, ndmin=1))
521521
c.close()
522522

523523
elif self.write_to == 'VoxelIndices':
@@ -531,7 +531,7 @@ def flush_chardata(self):
531531
# conversion to numpy array
532532
c = BytesIO(data.strip().encode('utf-8'))
533533
index = self.struct_state[-1]
534-
index.extend(np.atleast_1d(np.loadtxt(c, dtype=np.int)))
534+
index.extend(np.loadtxt(c, dtype=np.int, ndmin=1))
535535
c.close()
536536

537537
elif self.write_to == 'TransformMatrix':

0 commit comments

Comments
 (0)