@@ -38,30 +38,30 @@ def to_np_dtype(dtype):
38
38
39
39
40
40
def from_np_dtype (np_dtype ):
41
- if np_dtype == bool :
41
+ if np_dtype is bool :
42
42
return "BOOL"
43
- elif np_dtype == np .int8 :
43
+ elif np_dtype is np .int8 :
44
44
return "INT8"
45
- elif np_dtype == np .int16 :
45
+ elif np_dtype is np .int16 :
46
46
return "INT16"
47
- elif np_dtype == np .int32 :
47
+ elif np_dtype is np .int32 :
48
48
return "INT32"
49
- elif np_dtype == np .int64 :
49
+ elif np_dtype is np .int64 :
50
50
return "INT64"
51
- elif np_dtype == np .uint8 :
51
+ elif np_dtype is np .uint8 :
52
52
return "UINT8"
53
- elif np_dtype == np .uint16 :
53
+ elif np_dtype is np .uint16 :
54
54
return "UINT16"
55
- elif np_dtype == np .uint32 :
55
+ elif np_dtype is np .uint32 :
56
56
return "UINT32"
57
- elif np_dtype == np .uint64 :
57
+ elif np_dtype is np .uint64 :
58
58
return "UINT64"
59
- elif np_dtype == np .float16 :
59
+ elif np_dtype is np .float16 :
60
60
return "FP16"
61
- elif np_dtype == np .float32 :
61
+ elif np_dtype is np .float32 :
62
62
return "FP32"
63
- elif np_dtype == np .float64 :
63
+ elif np_dtype is np .float64 :
64
64
return "FP64"
65
- elif np_dtype == np .object_ or np_dtype .type == np .bytes_ :
65
+ elif np_dtype is np .object_ or np_dtype .type is np .bytes_ :
66
66
return "BYTES"
67
67
return None
0 commit comments