-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
+ and - throw error with UpperTriangular matrices #19615
Comments
So should these just return a full matrix? |
@yuyichao yes, I think so. Probably something like |
not if the wrapped type is sparse. |
Sorry - |
@tkelman Is this the conclusion in one of the recent julia> typeof(sprandn(10,10,0.1) .+ 1)
Array{Float64,2}
julia> typeof(broadcast(+, sprandn(10,10,0.1), 1))
SparseMatrixCSC{Float64,Int64} but densifying seems more sensible for |
#17623 fixed the inconsistency I believe julia> typeof(sprandn(10,10,0.1) .+ 1)
SparseMatrixCSC{Float64,Int64} Best! |
Perhaps for the special |
Maybe @stevengj would now if we can get rid of them. |
The promotion rules are slightly different for abstract types, so I didn't want to change them in that PR. It seemed best to do it in a separate PR. |
Ref. related discussion https://github.com/JuliaLang/julia/issues/19595#issuecomment-268070182 and the forthcoming issue from |
See #19669 re. the type behavior. |
Fixed by #19746 |
The text was updated successfully, but these errors were encountered: