File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,16 +94,16 @@ def _map_dtype(self, dtype):
9494 return dtype
9595
9696 # Map numpy dtypes to torch dtypes
97- if dt == np .float64 : return torch .float64
98- if dt == np .float32 : return torch .float32
99- if dt == np .float16 : return torch .float16
100- if dt == np .int64 : return torch .long
101- if dt == np .int32 : return torch .int32
102- if dt == np .int16 : return torch .int16
103- if dt == np .int8 : return torch .int8
104- if dt == np .complex128 : return torch .complex128
105- if dt == np .complex64 : return torch .complex64
106- if dt == np .bool_ : return torch .bool
97+ if dt == np .dtype ( ' float64' ) : return torch .float64
98+ if dt == np .dtype ( ' float32' ) : return torch .float32
99+ if dt == np .dtype ( ' float16' ) : return torch .float16
100+ if dt == np .dtype ( ' int64' ) : return torch .long
101+ if dt == np .dtype ( ' int32' ) : return torch .int32
102+ if dt == np .dtype ( ' int16' ) : return torch .int16
103+ if dt == np .dtype ( ' int8' ) : return torch .int8
104+ if dt == np .dtype ( ' complex128' ) : return torch .complex128
105+ if dt == np .dtype ( ' complex64' ) : return torch .complex64
106+ if dt == np .dtype ( 'bool' ) : return torch .bool
107107
108108 return dtype
109109
You can’t perform that action at this time.
0 commit comments