Skip to content

Commit 3d6a635

Browse files
committed
Fixes dpt.copy returning TypeError instead of raising
When provided a non-usm_ndarray-input to copy, copy would return the error instead of raising it
1 parent 5fca9e2 commit 3d6a635

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dpctl/tensor/_copy_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ def copy(usm_ary, order="K"):
523523
)
524524
order = order[0].upper()
525525
if not isinstance(usm_ary, dpt.usm_ndarray):
526-
return TypeError(
526+
raise TypeError(
527527
f"Expected object of type dpt.usm_ndarray, got {type(usm_ary)}"
528528
)
529529
copy_order = "C"

0 commit comments

Comments
 (0)