File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 66import numpy as np
77
88from ..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
1111from ..arraywriters import ScalingError
1212from ..casting import best_float , ulp , type_info
1313
@@ -95,9 +95,9 @@ def test_round_trip():
9595 N = 10000
9696 sd_10s = range (- 20 , 51 , 5 )
9797 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 ]
101101 f_types = [np .float32 , np .float64 ]
102102 # Expanding standard deviations
103103 for i , sd_10 in enumerate (sd_10s ):
You can’t perform that action at this time.
0 commit comments