Skip to content

Commit 89000a2

Browse files
committed
Power is properly working for complex types with latest dpctl
1 parent 9828c24 commit 89000a2

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

tests/test_mathematical.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1876,13 +1876,7 @@ def test_complex_values(self):
18761876
dp_arr = dpnp.array(np_arr)
18771877
func = lambda x: x**2
18781878

1879-
# Linux: ((inf + 0j) ** 2) == (Inf + NaNj) in dpnp and == (NaN + NaNj) in numpy
1880-
# Win: ((inf + 0j) ** 2) == (Inf + 0j) in dpnp and == (Inf + NaNj) in numpy
1881-
if is_win_platform():
1882-
assert_equal(func(dp_arr)[5], numpy.inf)
1883-
else:
1884-
assert_equal(func(dp_arr)[5], (numpy.inf + 0j) * 1)
1885-
assert_allclose(func(np_arr)[:5], func(dp_arr).asnumpy()[:5], rtol=1e-6)
1879+
assert_dtype_allclose(func(dp_arr), func(np_arr))
18861880

18871881
@pytest.mark.parametrize("val", [0, 1], ids=["0", "1"])
18881882
@pytest.mark.parametrize("dtype", [dpnp.int32, dpnp.int64])

0 commit comments

Comments
 (0)