File tree 1 file changed +5
-5
lines changed 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 6
6
import numpy as np
7
7
8
8
from ..externals .six import BytesIO
9
- from .. import Nifti1Image
10
- from ..spatialimages import HeaderDataError
9
+ from .. import Nifti1Image , Nifti1Header
10
+ from ..spatialimages import HeaderDataError , supported_np_types
11
11
from ..arraywriters import ScalingError
12
12
from ..casting import best_float , ulp , type_info
13
13
@@ -95,9 +95,9 @@ def test_round_trip():
95
95
N = 10000
96
96
sd_10s = range (- 20 , 51 , 5 )
97
97
iuint_types = np .sctypes ['int' ] + np .sctypes ['uint' ]
98
- # Remove intp types, which cannot be set into nifti header datatype
99
- iuint_types . remove ( np . intp )
100
- iuint_types . remove ( np . uintp )
98
+ # Remove types which cannot be set into nifti header datatype
99
+ nifti_supported = supported_np_types ( Nifti1Header () )
100
+ iuint_types = [ t for t in iuint_types if t in nifti_supported ]
101
101
f_types = [np .float32 , np .float64 ]
102
102
# Expanding standard deviations
103
103
for i , sd_10 in enumerate (sd_10s ):
You can’t perform that action at this time.
0 commit comments