You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
julia> y =sprand(10, 0.2)
10-element SparseVector{Float64,Int64} with 2 stored entries:
[2 ] =0.804026
[3 ] =0.0159904
Then, firstly, there is no method that works implicitly on the main diagonal, like diagm(y) does -- you have to explicitely say spdiagm(0 => y). Secondly, and more importantly, this method does not preserve sparsity of the input:
Say we have
Then, firstly, there is no method that works implicitly on the main diagonal, like
diagm(y)
does -- you have to explicitely sayspdiagm(0 => y)
. Secondly, and more importantly, this method does not preserve sparsity of the input:Where I really had expected the result to be
(That's on 1.3.1, sorry for not having updated yet :))
The text was updated successfully, but these errors were encountered: