47
47
from .._h5py_compat import h5py , have_h5py
48
48
from .. import ecat
49
49
from .. import parrec
50
+ from ..casting import have_binary128
50
51
51
52
from ..arrayproxy import ArrayProxy , is_proxy
52
53
@@ -192,6 +193,7 @@ class TestAnalyzeProxyAPI(_TestProxyAPI):
192
193
shapes = ((2 ,), (2 , 3 ), (2 , 3 , 4 ), (2 , 3 , 4 , 5 ))
193
194
has_slope = False
194
195
has_inter = False
196
+ data_dtypes = (np .uint8 , np .int16 , np .int32 , np .float32 , np .complex64 , np .float64 )
195
197
array_order = 'F'
196
198
# Cannot set offset for Freesurfer
197
199
settable_offset = True
@@ -218,9 +220,8 @@ def obj_params(self):
218
220
offsets = (0 , 16 )
219
221
slopes = (1. , 2. , 3.1416 ) if self .has_slope else (1. ,)
220
222
inters = (0. , 10. , 2.7183 ) if self .has_inter else (0. ,)
221
- dtypes = (np .uint8 , np .int16 , np .float32 )
222
223
for shape , dtype , offset , slope , inter in product (self .shapes ,
223
- dtypes ,
224
+ self . data_dtypes ,
224
225
offsets ,
225
226
slopes ,
226
227
inters ):
@@ -325,6 +326,10 @@ class TestSpm2AnalyzeProxyAPI(TestSpm99AnalyzeProxyAPI):
325
326
class TestNifti1ProxyAPI (TestSpm99AnalyzeProxyAPI ):
326
327
header_class = Nifti1Header
327
328
has_inter = True
329
+ data_dtypes = (np .uint8 , np .int16 , np .int32 , np .float32 , np .complex64 , np .float64 ,
330
+ np .int8 , np .uint16 , np .uint32 , np .int64 , np .uint64 , np .complex128 )
331
+ if have_binary128 ():
332
+ data_dtypes .extend (np .float128 , np .complex256 )
328
333
329
334
330
335
class TestMGHAPI (TestAnalyzeProxyAPI ):
@@ -334,6 +339,7 @@ class TestMGHAPI(TestAnalyzeProxyAPI):
334
339
has_inter = False
335
340
settable_offset = False
336
341
data_endian = '>'
342
+ data_dtypes = (np .uint8 , np .int16 , np .int32 , np .float32 )
337
343
338
344
339
345
class TestMinc1API (_TestProxyAPI ):
0 commit comments