diff --git a/dpctl/tensor/_clip.py b/dpctl/tensor/_clip.py index c799a98b46..c1ac402849 100644 --- a/dpctl/tensor/_clip.py +++ b/dpctl/tensor/_clip.py @@ -246,7 +246,7 @@ def _clip_none(x, val, out, order, _binary_fn): _fp16 = sycl_dev.has_aspect_fp16 _fp64 = sycl_dev.has_aspect_fp64 if not _can_cast(val_dtype, res_dt, _fp16, _fp64): - raise TypeError( + raise ValueError( f"function 'clip' does not support input types " f"({x_dtype}, {val_dtype}), " "and the inputs could not be safely coerced to any " @@ -527,7 +527,7 @@ def clip(x, min=None, max=None, out=None, order="K"): ) if res_dt is None: - raise TypeError( + raise ValueError( f"function '{clip}' does not support input types " f"({x_dtype}, {min_dtype}, {max_dtype}), " "and the inputs could not be safely coerced to any " diff --git a/dpctl/tensor/_elementwise_common.py b/dpctl/tensor/_elementwise_common.py index baaac078b5..48adc45808 100644 --- a/dpctl/tensor/_elementwise_common.py +++ b/dpctl/tensor/_elementwise_common.py @@ -481,7 +481,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 "