Skip to content

Commit a214e26

Browse files
authored
Merge pull request #62 from honno/divide-pow-fixes
Update divide and pow input dtypes
2 parents f09c939 + fbd9937 commit a214e26

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

xptests/dtype_helpers.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ def result_type(*dtypes: DataType):
210210
"ceil": numeric_dtypes,
211211
"cos": float_dtypes,
212212
"cosh": float_dtypes,
213-
"divide": float_dtypes,
213+
"divide": numeric_dtypes,
214214
"equal": all_dtypes,
215215
"exp": float_dtypes,
216216
"expm1": float_dtypes,
@@ -236,7 +236,7 @@ def result_type(*dtypes: DataType):
236236
"negative": numeric_dtypes,
237237
"not_equal": all_dtypes,
238238
"positive": numeric_dtypes,
239-
"pow": float_dtypes,
239+
"pow": numeric_dtypes,
240240
"remainder": numeric_dtypes,
241241
"round": numeric_dtypes,
242242
"sign": numeric_dtypes,

xptests/test_elementwise_functions.py renamed to xptests/test_operators_and_elementwise_functions.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ def test_cosh(x):
649649
ah.assert_exactly_equal(domain, codomain)
650650

651651

652-
@pytest.mark.parametrize(binary_argnames, make_binary_params("divide", dh.float_dtypes))
652+
@pytest.mark.parametrize(binary_argnames, make_binary_params("divide", dh.numeric_dtypes))
653653
@given(data=st.data())
654654
def test_divide(
655655
func_name,
@@ -1252,7 +1252,7 @@ def test_positive(func_name, func, strat, data):
12521252
ah.assert_exactly_equal(out, x)
12531253

12541254

1255-
@pytest.mark.parametrize(binary_argnames, make_binary_params("pow", dh.float_dtypes))
1255+
@pytest.mark.parametrize(binary_argnames, make_binary_params("pow", dh.numeric_dtypes))
12561256
@given(data=st.data())
12571257
def test_pow(
12581258
func_name,

0 commit comments

Comments
 (0)