Skip to content

Commit 3cbb221

Browse files
Merge pull request #1362 from IntelPython/improve-error-message
Improved message text in two exceptions
2 parents c3427b3 + ddcb0ae commit 3cbb221

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dpctl/tensor/_elementwise_common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ def __call__(self, o1, o2, out=None, order="K"):
468468
o1_dtype = _get_dtype(o1, sycl_dev)
469469
o2_dtype = _get_dtype(o2, sycl_dev)
470470
if not all(_validate_dtype(o) for o in (o1_dtype, o2_dtype)):
471-
raise ValueError("Operands of unsupported types")
471+
raise ValueError("Operands have unsupported data types")
472472

473473
o1_dtype, o2_dtype = _resolve_weak_types(o1_dtype, o2_dtype, sycl_dev)
474474

@@ -498,7 +498,7 @@ def __call__(self, o1, o2, out=None, order="K"):
498498
if out.shape != res_shape:
499499
raise ValueError(
500500
"The shape of input and output arrays are inconsistent. "
501-
f"Expected output shape is {o1_shape}, got {out.shape}"
501+
f"Expected output shape is {res_shape}, got {out.shape}"
502502
)
503503

504504
if res_dt != out.dtype:

0 commit comments

Comments
 (0)