-
Notifications
You must be signed in to change notification settings - Fork 149
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
Multiplication involving transpose of a Matrix{<:SMatrix}
#966
Comments
I think this may be an issue with Julia matmul code here: https://github.com/JuliaLang/julia/blob/1b93d53fc4bb59350ada898038ed4de2994cce33/stdlib/LinearAlgebra/src/matmul.jl#L831 . |
I guess this could be closed cf. the discussion in JuliaLang/LinearAlgebra.jl#500. |
Thanks for tracking this. Should the problem be fixed with JuliaLang/julia#42309? I tried running the example above on the nightly build, and I still get the same behaviour. |
I ran into another strange behaviour as well when trying to rely on the generic matmul for some operations on matrices of static matrices which I think should make sense. The example below illustrates the issue: using StaticArrays
using LinearAlgebra
smat = @SMatrix [1 2; 3 4]
# mul! with matrices works fine
A = fill(smat, 1, 1)
B = fill(smat, 1, 1)
C = fill(smat, 1, 1)
mul!(copy(C),A,B,1,0) ≈ A*B # ok
mul!(copy(C),A,B,1,1) ≈ A*B + C # ok
# mul! with `matvecmul` throws an error
A = fill(smat, 1, 1)
B = fill(smat, 1)
C = fill(smat, 1)
mul!(copy(C),A,B,1,0) ≈ A*B # ok
mul!(copy(C),A,B,1,1) ≈ A*B + C # error with MulAddAmul Thanks for the help! |
Huh, yeah, I confirm that this is indeed not fixed after all. Testing on 1.8.0-DEV.763, the previous test case still fails. |
Fixed in JuliaLang/LinearAlgebra.jl#1033 |
Hi,
I ran into the following (wrong?) behaviour when trying to multiply the following matrices of
SMatrix
:On my machine, the difference goes away if either
A
orB
is changed to anMMatrix
, which I found a bit puzzling. Here is some info on my version:Thanks!
The text was updated successfully, but these errors were encountered: