Skip to content

Commit 6c30a84

Browse files
author
Mathieu Scheltienne
committed
try without using the sized aliases
1 parent ac9e16f commit 6c30a84

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

nibabel/casting.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ class CastingError(Exception):
2525

2626
# np.sctypes is deprecated in numpy 2.0 and np.core.sctypes should not be used instead.
2727
sctypes = {
28-
'int': [np.int8, np.int16, np.int32, np.int64],
29-
'uint': [np.uint8, np.uint16, np.uint32, np.uint64],
30-
'float': [np.float16, np.float32, np.float64, np.float128],
31-
'complex': [np.complex64, np.complex128, np.complex256],
28+
'int': list(set([np.byte, np.short, np.intc, np.longlong])),
29+
'uint': list(set([np.ubyte, np.ushort, np.uintc, np.ulonglong])),
30+
'float': list(set([np.half, np.single, np.double, np.longdouble])),
31+
'complex': list(set([np.csingle, np.cdouble, np.clongdouble])),
3232
'others': [bool, object, bytes, str, np.void],
3333
}
3434

0 commit comments

Comments
 (0)