Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix definition of complex inner product in vecdot #723

Merged
merged 1 commit into from
Dec 18, 2023

Conversation

mtsokol
Copy link
Contributor

@mtsokol mtsokol commented Dec 14, 2023

Hi!

As torch.vdot, torch.linalg.vecdot and numpy.vdot perform conjugate on the first parameter it appears that the definition of vecdot in the Array API is incorrect: It performs conjugate on the second parameter.

This PR updates vecdot definition. WDYT?

@kgryte
Copy link
Contributor

kgryte commented Dec 18, 2023

@mtsokol Thanks for creating this PR. This relates to #616.

In the workgroup meeting on 30 Nov, we discussed #616 and consensus from that meeting was to fix the definition of vecdot in the specification, as done in this PR.

The proposed change should be considered a bug fix stemming from an oversight when originally adding vecdot to the specification.

@kgryte kgryte changed the title Update vecdot definition Fix definition of complex inner product in vecdot Dec 18, 2023
@kgryte kgryte added topic: Linear Algebra Linear algebra. Backport Changes involve backporting to previous versions. labels Dec 18, 2023
@kgryte kgryte merged commit 5c2423a into data-apis:main Dec 18, 2023
@mtsokol mtsokol deleted the update-vecdot branch December 18, 2023 21:02
@kgryte kgryte added this to the v2023 milestone Feb 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backport Changes involve backporting to previous versions. topic: Linear Algebra Linear algebra.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants