Skip to content

Commit 12a44f3

Browse files
committed
test_conj
1 parent bfdad3f commit 12a44f3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

array_api_tests/test_operators_and_elementwise_functions.py

+8
Original file line numberDiff line numberDiff line change
@@ -948,6 +948,14 @@ def test_ceil(x):
948948
unary_assert_against_refimpl("ceil", x, out, math.ceil, strict_check=True)
949949

950950

951+
@given(xps.arrays(dtype=xps.complex_dtypes(), shape=hh.shapes()))
952+
def test_conj(x):
953+
out = xp.conj(x)
954+
ph.assert_dtype("conj", x.dtype, out.dtype)
955+
ph.assert_shape("conj", out.shape, x.shape)
956+
unary_assert_against_refimpl("conj", x, out, operator.methodcaller("conjugate"))
957+
958+
951959
@given(xps.arrays(dtype=all_floating_dtypes(), shape=hh.shapes()))
952960
def test_cos(x):
953961
out = xp.cos(x)

0 commit comments

Comments
 (0)