Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions array_api_tests/test_linalg.py
Original file line number Diff line number Diff line change
Expand Up @@ -964,6 +964,16 @@ def test_vecdot(x1, x2, data):
_test_vecdot(_array_module, x1, x2, data)


@pytest.mark.xp_extension('linalg')
def test_vecdot_conj():
# no-hypothesis test to check that the 1st argument is in fact conjugated
x1 = xp.asarray([1j, 2j, 3j])
x2 = xp.asarray([1, 2j, 3])

import cmath
assert cmath.isclose(complex(xp.linalg.vecdot(x1, x2)), 4 - 10j)


# Insanely large orders might not work. There isn't a limit specified in the
# spec, so we just limit to reasonable values here.
max_ord = 100
Expand Down