Skip to content

Commit 39a8df0

Browse files
committed
Skip testing negative integer exponents for pow related functions
Out-of-scope scenario
1 parent a214e26 commit 39a8df0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

xptests/test_operators_and_elementwise_functions.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1267,6 +1267,12 @@ def test_pow(
12671267
):
12681268
left = data.draw(left_strat, label=left_sym)
12691269
right = data.draw(right_strat, label=right_sym)
1270+
if right_is_scalar:
1271+
if isinstance(right, int):
1272+
assume(right >= 0)
1273+
else:
1274+
if dh.is_int_dtype(right.dtype):
1275+
assume(xp.all(right >= 0))
12701276

12711277
try:
12721278
func(left, right)

0 commit comments

Comments
 (0)