Skip to content
Merged
Changes from 1 commit
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
8 changes: 4 additions & 4 deletions dpctl/tensor/_elementwise_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def __call__(self, x, out=None, order="K"):
acceptance_fn=self.acceptance_fn_,
)
if res_dt is None:
raise TypeError(
raise ValueError(
f"function '{self.name_}' does not support input type "
f"({x.dtype}), "
"and the input could not be safely coerced to any "
Expand All @@ -209,7 +209,7 @@ def __call__(self, x, out=None, order="K"):
)

if res_dt != out.dtype:
raise TypeError(
raise ValueError(
f"Output array of type {res_dt} is needed,"
f" got {out.dtype}"
)
Expand Down Expand Up @@ -587,7 +587,7 @@ def __call__(self, o1, o2, out=None, order="K"):
)

if res_dt is None:
raise TypeError(
raise ValueError(
f"function '{self.name_}' does not support input types "
f"({o1_dtype}, {o2_dtype}), "
"and the inputs could not be safely coerced to any "
Expand All @@ -608,7 +608,7 @@ def __call__(self, o1, o2, out=None, order="K"):
)

if res_dt != out.dtype:
raise TypeError(
raise ValueError(
f"Output array of type {res_dt} is needed,"
f"got {out.dtype}"
)
Expand Down