Skip to content

Commit 6bb2d73

Browse files
Change exception raised by __dlpack__ if dl_device is unsupported
It used to raise NotImplementedError, not raises BufferError
1 parent 11195b8 commit 6bb2d73

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dpctl/tensor/_usmarray.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,7 @@ cdef class usm_ndarray:
11881188
_arr.flags["W"] = self.flags["W"]
11891189
return c_dlpack.numpy_to_dlpack_versioned_capsule(_arr, True)
11901190
else:
1191-
raise NotImplementedError(
1191+
raise BufferError(
11921192
f"targeting `dl_device` {dl_device} with `__dlpack__` is not "
11931193
"yet implemented"
11941194
)

0 commit comments

Comments
 (0)