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 1
1
import pytest
2
2
import numpy
3
3
import os
4
+ from distutils .version import LooseVersion
4
5
5
6
DATADIR = os .path .realpath (
6
7
os .path .join (os .path .dirname (__file__ ), 'testing/data' ))
@@ -19,3 +20,5 @@ def in_testing(request):
19
20
# This seems to be a reliable way to distinguish tests from doctests
20
21
if request .function is None :
21
22
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):
61
61
'segmentation0.nii.gz'
62
62
63
63
>>> 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.]]
68
68
69
69
>>> reorient.inputs.orientation = 'RAS'
70
70
>>> res = reorient.run()
71
71
>>> res.outputs.out_file # doctest: +ELLIPSIS
72
72
'.../segmentation0_ras.nii.gz'
73
73
74
74
>>> 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.]]
79
79
80
80
.. testcleanup::
81
81
You can’t perform that action at this time.
0 commit comments