Skip to content

Commit 10ae9bc

Browse files
committed
FIX: Check final delimiter is ONLY infs
1 parent 74c3410 commit 10ae9bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nibabel/streamlines/tck.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ def _read(cls, fileobj, header, buffer_size=4):
431431
# the rest gets appended to the leftover
432432
leftover = coords[begin:]
433433

434-
if not np.isinf(leftover).all():
434+
if not (leftover.shape == (1, 3) and np.isinf(leftover).all()):
435435
raise DataError("Expecting end-of-file marker 'inf inf inf'")
436436

437437
# In case the 'count' field was not provided.

0 commit comments

Comments
 (0)