Skip to content

Commit cf99743

Browse files
committed
WIP: debugging round trip error
1 parent 8419ecd commit cf99743

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

nibabel/tests/test_round_trip.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
import numpy as np
77

88
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
1111
from ..arraywriters import ScalingError
1212
from ..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):

0 commit comments

Comments
 (0)