Skip to content

Commit 1544e9b

Browse files
committed
Clean up errors in __dlpack__
1 parent f781400 commit 1544e9b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

dpctl/tensor/_usmarray.pyx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,17 +1161,17 @@ cdef class usm_ndarray:
11611161
raise TypeError(
11621162
"`__dlpack__` expects `max_version` to be a "
11631163
"2-tuple of integers `(major, minor)`, instead "
1164-
f"got {type(max_version)}"
1164+
f"got {max_version}"
11651165
)
11661166
dpctl_dlpack_version = get_build_dlpack_version()
11671167
if max_version[0] >= dpctl_dlpack_version[0]:
11681168
# DLManagedTensorVersioned path
11691169
if dl_device is not None:
11701170
if not isinstance(dl_device, tuple) or len(dl_device) != 2:
11711171
raise TypeError(
1172-
"`__dlpack__` expects `dl_device` to be a "
1173-
"2-tuple of `(device_type, device_id)`, instead "
1174-
f"got {type(dl_device)}"
1172+
"`__dlpack__` expects `dl_device` to be a 2-tuple "
1173+
"of `(device_type, device_id)`, instead "
1174+
f"got {dl_device}"
11751175
)
11761176
if dl_device != self.__dlpack_device__():
11771177
if copy == False:

0 commit comments

Comments
 (0)