Skip to content

Improved message text in two exceptions #1362

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dpctl/tensor/_elementwise_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ def __call__(self, o1, o2, out=None, order="K"):
o1_dtype = _get_dtype(o1, sycl_dev)
o2_dtype = _get_dtype(o2, sycl_dev)
if not all(_validate_dtype(o) for o in (o1_dtype, o2_dtype)):
raise ValueError("Operands of unsupported types")
raise ValueError("Operands have unsupported data types")

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

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

if res_dt != out.dtype:
Expand Down