8000 Merge pull request #201 from asmeurer/vecdot-conj · data-apis/array-api-compat@ee25aae · GitHub
[go: up one dir, main page]

Skip to content

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Lines changed: 1 addition & 1 deletion
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)
0