Skip to content

Commit ee25aae

Browse files
authored
Merge pull request #201 from asmeurer/vecdot-conj
Conjugate the first argument in vecdot
2 parents 382bbac + 89a85a6 commit ee25aae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

array_api_compat/common/_aliases.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ def vecdot(x1: ndarray, x2: ndarray, /, xp, *, axis: int = -1) -> ndarray:
479479
x2_ = xp.moveaxis(x2, axis, -1)
480480
x1_, x2_ = _broadcast(x1_, x2_)
481481

482-
res = x1_[..., None, :] @ x2_[..., None]
482+
res = xp.conj(x1_[..., None, :]) @ x2_[..., None]
483483
return res[..., 0, 0]
484484

485485
# isdtype is a new function in the 2022.12 array API specification.

0 commit comments

Comments
 (0)