Skip to content

Commit ddffe11

Browse files
authored
Merge pull request #383 from cbourjau/fix-overflow-asarray-very-large-uints
Avoid unspecified behavior in asarray with very large intergers
2 parents 3c273cd + c36e98b commit ddffe11

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,8 +1000,8 @@ def test_clip(x, data):
10001000
hh.arrays(dtype=st.just(x.dtype), shape=shape2),
10011001
), label="max")
10021002

1003-
# min > max is undefined (but allow nans)
1004-
assume(min is None or max is None or not xp.any(ah.less(xp.asarray(max), xp.asarray(min))))
1003+
# Note1: min > max is undefined (but allow nans)
1004+
assume(min is None or max is None or not xp.any(ah.less(xp.asarray(max, dtype=x.dtype), xp.asarray(min, dtype=x.dtype))))
10051005

10061006
kw = data.draw(
10071007
hh.specified_kwargs(

0 commit comments

Comments
 (0)