File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -29,16 +29,20 @@ cdef class GPUMemoryView:
2929 return (f" GPUMemoryView(ptr={self.ptr},\n "
3030 + f" shape={self.shape},\n "
3131 + f" strides={self.strides},\n "
32- + f" dtype={self.dtype.__name__ },\n "
32+ + f" dtype={get_simple_repr( self.dtype) },\n "
3333 + f" device_id={self.device_id},\n "
3434 + f" device_accessible={self.device_accessible},\n "
3535 + f" readonly={self.readonly},\n "
3636 + f" obj={get_simple_repr(self.obj)})" )
3737
3838
3939cdef str get_simple_repr(obj):
40- cdef object obj_class = obj. __class__
40+ cdef object obj_class
4141 cdef str obj_repr
42+ if isinstance (obj, type ):
43+ obj_class = obj
44+ else :
45+ obj_class = obj.__class__
4246 if obj_class.__module__ in (None , " builtins" ):
4347 obj_repr = obj_class.__name__
4448 else :
You can’t perform that action at this time.
0 commit comments