Skip to content

Commit 3639711

Browse files
author
Mathieu Scheltienne
committed
Revert "try without using the sized aliases"
This reverts commit 6c30a84.
1 parent 6c30a84 commit 3639711

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': 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])),
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],
3232
'others': [bool, object, bytes, str, np.void],
3333
}
3434

0 commit comments

Comments
 (0)