Skip to content

Commit a3f2555

Browse files
committed
test pow() with scalars
1 parent 31eec9d commit a3f2555

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

array_api_tests/test_operators_and_elementwise_functions.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,9 @@ def _assert_correctness_binary(
724724
x1a, x2a = in_arrs
725725
ph.assert_dtype(name, in_dtype=in_dtypes, out_dtype=out.dtype, expected=expected_dtype)
726726
ph.assert_result_shape(name, in_shapes=in_shapes, out_shape=out.shape)
727-
binary_assert_against_refimpl(name, x1a, x2a, out, func, **kwargs)
727+
check_values = kwargs.pop('check_values', None)
728+
if check_values:
729+
binary_assert_against_refimpl(name, x1a, x2a, out, func, **kwargs)
728730

729731

730732
@pytest.mark.parametrize("ctx", make_unary_params("abs", dh.numeric_dtypes))
@@ -1824,6 +1826,7 @@ def _filter_zero(x):
18241826
("less_equal", operator.le, {}, xp.bool),
18251827
("greater", operator.gt, {}, xp.bool),
18261828
("greater_equal", operator.ge, {}, xp.bool),
1829+
("pow", operator.pow, {'check_values': False}, None) # too finicky for pow
18271830
],
18281831
ids=lambda func_data: func_data[0] # use names for test IDs
18291832
)

0 commit comments

Comments
 (0)