File tree Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Original file line number Diff line number Diff line change 11import pytest
22import numpy
33import os
4+ from distutils .version import LooseVersion
45
56DATADIR = os .path .realpath (
67 os .path .join (os .path .dirname (__file__ ), 'testing/data' ))
@@ -19,3 +20,5 @@ def in_testing(request):
1920 # This seems to be a reliable way to distinguish tests from doctests
2021 if request .function is None :
2122 os .chdir (DATADIR )
23+ if LooseVersion (numpy .__version__ ) >= LooseVersion ('1.14' ):
24+ numpy .set_printoptions (legacy = "1.13" )
Original file line number Diff line number Diff line change @@ -61,21 +61,21 @@ class Reorient(SimpleInterface):
6161 'segmentation0.nii.gz'
6262
6363 >>> print(np.loadtxt(res.outputs.transform))
64- [[1. 0. 0. 0.]
65- [0. 1. 0. 0.]
66- [0. 0. 1. 0.]
67- [0. 0. 0. 1.]]
64+ [[ 1. 0. 0. 0.]
65+ [ 0. 1. 0. 0.]
66+ [ 0. 0. 1. 0.]
67+ [ 0. 0. 0. 1.]]
6868
6969 >>> reorient.inputs.orientation = 'RAS'
7070 >>> res = reorient.run()
7171 >>> res.outputs.out_file # doctest: +ELLIPSIS
7272 '.../segmentation0_ras.nii.gz'
7373
7474 >>> print(np.loadtxt(res.outputs.transform))
75- [[-1. 0. 0. 60.]
76- [ 0. -1. 0. 72.]
77- [ 0. 0. 1. 0.]
78- [ 0. 0. 0. 1.]]
75+ [[ -1. 0. 0. 60.]
76+ [ 0. -1. 0. 72.]
77+ [ 0. 0. 1. 0.]
78+ [ 0. 0. 0. 1.]]
7979
8080 .. testcleanup::
8181
You can’t perform that action at this time.
0 commit comments