Skip to content

Commit 48e53c0

Browse files
committed
test_clip: make sure min and max have the same dtype as x
Per the spec: 'should have the same dtype as x'
1 parent c48410f commit 48e53c0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

array_api_tests/test_operators_and_elementwise_functions.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -992,12 +992,12 @@ def test_clip(x, data):
992992
min = data.draw(st.one_of(
993993
st.none(),
994994
hh.scalars(dtypes=st.just(x.dtype)),
995-
hh.arrays(dtype=dtypes, shape=shape1),
995+
hh.arrays(dtype=st.just(x.dtype), shape=shape1),
996996
), label="min")
997997
max = data.draw(st.one_of(
998998
st.none(),
999999
hh.scalars(dtypes=st.just(x.dtype)),
1000-
hh.arrays(dtype=dtypes, shape=shape2),
1000+
hh.arrays(dtype=st.just(x.dtype), shape=shape2),
10011001
), label="max")
10021002

10031003
# min > max is undefined (but allow nans)

0 commit comments

Comments
 (0)