Skip to content

Commit e2ae30b

Browse files
committed
Conjugate the first argument in vecdot
This is currently untested by the test suite (data-apis/array-api-tests#312) Fixes #97.
1 parent d086c61 commit e2ae30b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

array_api_strict/_linear_algebra_functions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,5 +86,5 @@ def vecdot(x1: Array, x2: Array, /, *, axis: int = -1) -> Array:
8686
x1_ = np.moveaxis(x1_, axis, -1)
8787
x2_ = np.moveaxis(x2_, axis, -1)
8888

89-
res = x1_[..., None, :] @ x2_[..., None]
89+
res = np.conj(x1_[..., None, :]) @ x2_[..., None]
9090
return Array._new(res[..., 0, 0], device=x1.device)

0 commit comments

Comments
 (0)