Skip to content

Commit 181c9bd

Browse files
committed
abbreviate flattening and sorting of second argument in isin
1 parent db0a082 commit 181c9bd

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
@@ -747,8 +747,8 @@ def isin(x, test_elements, /, *, invert=False):
747747
else:
748748
test_buf = test_arr
749749

750-
test_buf = dpt.reshape(test_buf, -1)
751-
test_buf = dpt.sort(test_buf)
750+
# flatten and sort
751+
test_buf = dpt.sort(dpt.reshape(test_buf, -1))
752752

753753
dst = dpt.empty_like(
754754
x_buf, dtype=dpt.bool, usm_type=res_usm_type, order="C"

0 commit comments

Comments
 (0)