Skip to content

Commit ce479f6

Browse files
committed
MAINT: searchsorted: restrict inputs to be finite real values
1 parent 8088d82 commit ce479f6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

array_api_tests/test_searching_functions.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,11 @@ def test_searchsorted(data):
246246
# TODO: Allow different dtypes for x1 and x2
247247
x1_dtype = data.draw(st.sampled_from(dh.real_dtypes))
248248
_x1 = data.draw(
249-
st.lists(xps.from_dtype(x1_dtype), min_size=1, unique=True),
249+
st.lists(
250+
xps.from_dtype(x1_dtype, allow_nan=False, allow_infinity=False),
251+
min_size=1,
252+
unique=True
253+
),
250254
label="_x1",
251255
)
252256
x1 = xp.asarray(_x1, dtype=x1_dtype)

0 commit comments

Comments
 (0)