Skip to content

Commit cf7bc9f

Browse files
authored
Merge pull request #429 from ev-br/rm_conj_workaround
MAINT: remove a _conj workaround for reals
2 parents 0d6432d + 56788ad commit cf7bc9f

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

array_api_tests/test_linalg.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -961,14 +961,6 @@ def true_trace(x_stack, offset=0):
961961
_test_stacks(linalg.trace, x, **kw, res=res, dims=0, true_val=true_trace)
962962

963963

964-
def _conj(x):
965-
# XXX: replace with xp.dtype when all array libraries implement it
966-
if x.dtype in (xp.complex64, xp.complex128):
967-
return xp.conj(x)
968-
else:
969-
return x
970-
971-
972964
def _test_vecdot(namespace, x1, x2, data):
973965
vecdot = namespace.vecdot
974966
broadcasted_shape = sh.broadcast_shapes(x1.shape, x2.shape)
@@ -994,7 +986,7 @@ def _test_vecdot(namespace, x1, x2, data):
994986
out_shape=res.shape, expected=expected_shape)
995987

996988
def true_val(x, y, axis=-1):
997-
return xp.sum(xp.multiply(_conj(x), y), dtype=res.dtype)
989+
return xp.sum(xp.multiply(xp.conj(x), y), dtype=res.dtype)
998990

999991
_test_stacks(vecdot, x1, x2, res=res, dims=0,
1000992
matrix_axes=(axis,), true_val=true_val)

0 commit comments

Comments
 (0)