diff --git a/dpctl/tensor/_copy_utils.py b/dpctl/tensor/_copy_utils.py index bc1b071460..81928692a6 100644 --- a/dpctl/tensor/_copy_utils.py +++ b/dpctl/tensor/_copy_utils.py @@ -37,7 +37,7 @@ def _copy_to_numpy(ary): if not isinstance(ary, dpt.usm_ndarray): - raise TypeError + raise TypeError(f"Expected dpctl.tensor.usm_ndarray, got {type(ary)}") nb = ary.usm_data.nbytes hh = dpm.MemoryUSMHost(nb, queue=ary.sycl_queue) hh.copy_from_device(ary.usm_data)