Skip to content

Commit

Permalink
Conjugate the first argument in vecdot
Browse files Browse the repository at this point in the history
This is currently untested by the test suite (data-apis/array-api-tests#312)

Fixes data-apis#97.
  • Loading branch information
asmeurer committed Nov 19, 2024
1 parent d086c61 commit e2ae30b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion array_api_strict/_linear_algebra_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,5 @@ def vecdot(x1: Array, x2: Array, /, *, axis: int = -1) -> Array:
x1_ = np.moveaxis(x1_, axis, -1)
x2_ = np.moveaxis(x2_, axis, -1)

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

0 comments on commit e2ae30b

Please sign in to comment.