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 adjoints of vector multiplication #20

Open
dlfivefifty opened this issue May 16, 2020 · 0 comments
Open

Fix adjoints of vector multiplication #20

dlfivefifty opened this issue May 16, 2020 · 0 comments

Comments

@dlfivefifty
Copy link
Member

Following is wrong:

julia> n = 5; c = randn(n); ArrayLayouts.mul(c',randn(n,n))
1×5 Array{Float64,2}:
 -0.938636  -0.342143  -2.26487  0.425856  0.777063

This fix takes some care as we don't have a notion of dual-vectors in the code. I think it's a good opportunity to fix the design in LinearAlgebra: for example, we could design it so that views of dual-vectors are also dual vectors, that is, fix this behaviour:

julia> view(randn(n)',:,1:3)*randn(3)
1-element Array{Float64,1}:
 -1.188417301392556

I think the fix is pretty straightforward: add a DualLayout (we don't need RowMajor or ColumnMajor since its both)... but possibly could think about it a bit more

@jagot

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

No branches or pull requests

1 participant