Skip to content

Commit 73562aa

Browse files
committed
Fix char2dtype dict for Windows
1 parent e92d87c commit 73562aa

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

blosc2/blosc2_ext.pyx

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,22 +1182,22 @@ cdef class SChunk:
11821182
blosc2_schunk_free(self.schunk)
11831183

11841184

1185-
char2dtype = {'?': np.NPY_BOOL,
1186-
'b': np.NPY_INT8,
1187-
'h': np.NPY_INT16,
1188-
'i': np.NPY_INT32,
1189-
'l': np.NPY_INT64,
1190-
'B': np.NPY_UINT8,
1191-
'H': np.NPY_UINT16,
1192-
'I': np.NPY_UINT32,
1193-
'L': np.NPY_UINT64,
1194-
'e': np.NPY_FLOAT16,
1195-
'f': np.NPY_FLOAT32,
1196-
'd': np.NPY_FLOAT64,
1197-
'F': np.NPY_COMPLEX64,
1198-
'D': np.NPY_COMPLEX128,
1199-
'M': np.NPY_DATETIME,
1200-
'm': np.NPY_TIMEDELTA,
1185+
char2dtype = {np.dtype(np.bool_).char: np.NPY_BOOL,
1186+
np.dtype(np.int8).char: np.NPY_INT8,
1187+
np.dtype(np.int16).char: np.NPY_INT16,
1188+
np.dtype(np.int32).char: np.NPY_INT32,
1189+
np.dtype(np.int64).char: np.NPY_INT64,
1190+
np.dtype(np.uint8).char: np.NPY_UINT8,
1191+
np.dtype(np.uint16).char: np.NPY_UINT16,
1192+
np.dtype(np.uint32).char: np.NPY_UINT32,
1193+
np.dtype(np.uint64).char: np.NPY_UINT64,
1194+
np.dtype(np.float16).char: np.NPY_FLOAT16,
1195+
np.dtype(np.float32).char: np.NPY_FLOAT32,
1196+
np.dtype(np.float64).char: np.NPY_FLOAT64,
1197+
np.dtype(np.complex64).char: np.NPY_COMPLEX64,
1198+
np.dtype(np.complex128).char: np.NPY_COMPLEX128,
1199+
np.dtype(np.datetime64).char: np.NPY_DATETIME,
1200+
np.dtype(np.timedelta64).char: np.NPY_TIMEDELTA,
12011201
}
12021202

12031203
# postfilter

0 commit comments

Comments
 (0)