-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Cannot add SymTridiagonal matrices based on sparse vectors #942
Comments
This works on julia> A + A
1×1 SymTridiagonal{Int64, SparseVector{Int64, Int64}}:
2
julia> versioninfo()
Julia Version 1.7.3
Commit 742b9abb4d (2022-05-06 12:58 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-12.0.1 (ORCJIT, tigerlake)
Environment:
JULIA_EDITOR = subl |
|
The issue is that adding julia> z = @view sparse([1, 2, 3])[1:3]
3-element view(::SparseVector{Int64, Int64}, 1:3) with eltype Int64:
1
2
3
julia> z + z
3-element Vector{Int64}:
2
4
6 I will see what can be done quickly. |
Ok I have a fix but I am not quite sure how to commit to SparseArrays now that it is its own package. |
Just open a PR on the |
I meant that a copy of SparseArrays still shows up in the Julia stdlib directory when opening it in VSCode, etc. but changes to it didn't get tracked by git. Anyway: JuliaSparse/SparseArrays.jl#225 |
@mcognetta After the pr is merged, just ask someone to BumpStdlibs. like JuliaLang/julia#46266 |
Is there any reason the diagonals of SymTridiagonal cannot have different types? |
I think that it is possible, but that is a much bigger change than necessary to fix this (all structured matrix types would have to be updated, and |
This fails:
I assume the problem is that
SymTridiagonal
matrices accidentally convert the internal representation of the off-diagonal elements to a dense vector.I am using
The text was updated successfully, but these errors were encountered: