We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 89a8d54 commit 1b41e14Copy full SHA for 1b41e14
torch_np/_dtypes.py
@@ -197,6 +197,7 @@ class bool_(generic):
197
_typecodes = {st.typecode: st for cat in sctypes for st in sctypes[cat]}
198
_torch_dtypes = {st.torch_dtype: st for cat in sctypes for st in sctypes[cat]}
199
200
+
201
_aliases = {
202
"u1": uint8,
203
"i1": int8,
@@ -287,7 +288,8 @@ def type(self):
287
288
289
@property
290
def kind(self):
- raise NotImplementedError
291
+ # https://numpy.org/doc/stable/reference/generated/numpy.dtype.kind.html
292
+ return _torch_dtypes[self.torch_dtype].name[0]
293
294
295
def typecode(self):
0 commit comments