data-apis / array-api

RFC document, tooling and other content related to the array API standard
https://data-apis.github.io/array-api/latest/
MIT License
205 stars 42 forks source link

Fix definition of complex inner product in `vecdot` #723

Closed mtsokol closed 6 months ago

mtsokol commented 6 months ago

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 commented 6 months ago

@mtsokol Thanks for creating this PR. This relates to https://github.com/data-apis/array-api/issues/616.

In the workgroup meeting on 30 Nov, we discussed https://github.com/data-apis/array-api/issues/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.