Skip to content

Commit f76a75c

Browse files
committed
Filter 0div int examples out for test_remainder
1 parent c5b3d62 commit f76a75c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

xptests/test_elementwise_functions.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1297,6 +1297,15 @@ def test_remainder(
12971297
):
12981298
left = data.draw(left_strat, label=left_sym)
12991299
right = data.draw(right_strat, label=right_sym)
1300+
if right_is_scalar:
1301+
out_dtype = left.dtype
1302+
else:
1303+
out_dtype = dh.result_type(left.dtype, right.dtype)
1304+
if dh.is_int_dtype(out_dtype):
1305+
if right_is_scalar:
1306+
assume(right != 0)
1307+
else:
1308+
assume(not ah.any(right == 0))
13001309
# TODO: rework same sign testing below to remove this
13011310
if not right_is_scalar:
13021311
assume(len(left.shape) <= len(right.shape))

0 commit comments

Comments
 (0)