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

Improve dot product #1773

Merged
merged 10 commits into from
Mar 29, 2020
Merged

Improve dot product #1773

merged 10 commits into from
Mar 29, 2020

Conversation

cshaa
Copy link
Collaborator

@cshaa cshaa commented Mar 13, 2020

  • makes dot product antilinear in the first argument (fixes Complex dot product doesn't conjugate #1761)
  • makes dot product more robust
    • it originally accepted only 1-dim vectors and arrays (see this comment)
    • now it also accepts column vectors as either matrix or array
    • types can be mixed
  • adds implementation for sparse vectors
  • makes multiply use dot for inner product
    • removes duplication in codebase

#coronathlon

@josdejong
Copy link
Owner

Thanks Michal, I like where this is going! It will be a breaking change so let's publish it with a new major version number.

It may be good to add a few unit tests to multiply to test the behaviour with complex numbers, since that is changed in your improved version implementation of dot?

I see you added a TODO "unify implementation with dot(a, b)", but it looks like you already did that, right?

@josdejong josdejong changed the base branch from develop to v7 March 29, 2020 15:04
@josdejong josdejong merged commit aafef57 into josdejong:v7 Mar 29, 2020
@josdejong
Copy link
Owner

Michal I've merged your improvements in dot product in a new v7 branch. See also #1532. Thanks again!

Will await a couple of days before publishing v7 containing just this change (which is fine, but let's give some time to think about other possible changes we want to have in now).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Complex dot product doesn't conjugate
2 participants