Skip to content

Commit 1ac19ae

Browse files
committed
make invert bool type check stricter
1 parent e28e1aa commit 1ac19ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dpctl/tensor/_set_functions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -698,8 +698,8 @@ def isin(
698698
du.validate_usm_type(res_usm_type, allow_none=False)
699699
sycl_dev = exec_q.sycl_device
700700

701-
if invert not in [True, False]:
702-
raise ValueError(f"`invert` must be `True` or `False`, got {invert}")
701+
if not isinstance(invert, bool):
702+
raise TypeError(f"`invert` must be `True` or `False`, got {invert}")
703703

704704
x_dt = _get_dtype(x, sycl_dev)
705705
test_dt = _get_dtype(test_elements, sycl_dev)

0 commit comments

Comments
 (0)