Skip to content

Commit f6de26c

Browse files
author
CindeeM
committed
BF fix doctest for ecat
1 parent b16584e commit f6de26c

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

nibabel/ecat.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,8 +462,12 @@ def get_frame_order(self):
462462
463463
Examples
464464
--------
465+
>>> import os
466+
>>> import nibabel as nib
467+
>>> nibabel_dir = os.path.dirname(nib.__file__)
465468
>>> from nibabel import ecat
466-
>>> img = ecat.load('nibabel/tests/data/tinypet.v')
469+
>>> ecat_file = os.path.join(nibabel_dir,'tests','data','tinypet.v')
470+
>>> img = ecat.load(ecat_file)
467471
>>> mlist = img.get_mlist()
468472
>>> mlist.get_frame_order()
469473
{0: [0, 16842758.0]}
@@ -696,8 +700,12 @@ def __init__(self, data, affine, header,
696700
697701
Examples
698702
--------
703+
>>> import os
704+
>>> import nibabel as nib
705+
>>> nibabel_dir = os.path.dirname(nib.__file__)
699706
>>> from nibabel import ecat
700-
>>> img = ecat.load('nibabel/tests/data/tinypet.v')
707+
>>> ecat_file = os.path.join(nibabel_dir,'tests','data','tinypet.v')
708+
>>> img = ecat.load(ecat_file)
701709
>>> frame0 = img.get_frame(0)
702710
>>> frame0.shape
703711
(10, 10, 3)

0 commit comments

Comments
 (0)