Open oxinabox opened 4 years ago
What I find inconsistent about the present behavior is:
julia> using LinearAlgebra
julia> S = Symmetric(ones(2,2));
julia> S .= 4;
julia> S
2×2 Symmetric{Float64, Matrix{Float64}}:
4.0 4.0
4.0 4.0
julia> S2 = similar(S);
julia> S2 .= S
2×2 Symmetric{Float64, Matrix{Float64}}:
4.0 4.0
4.0 4.0
so .. it is possible to set off-diagonal elements after all? Not only is the error confusing, it is also misleading.
Same happens to
Hermian
I can do it it I am not broadcasting, but it alocates a new
AH
and just rebinds the name. Which is allocating.In contast
UpperTrianguar
is fine with this:I can hack around it via: