-
Notifications
You must be signed in to change notification settings - Fork 56
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
add undef initializers #263
Conversation
Codecov Report
@@ Coverage Diff @@
## main #263 +/- ##
=======================================
Coverage 92.01% 92.02%
=======================================
Files 12 12
Lines 7317 7319 +2
=======================================
+ Hits 6733 6735 +2
Misses 584 584
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Is this semantically correct compared to other undef initializers? If so this seems like a fine addition. |
it seems so, the type has to be given as type parameter, it creates a new object of the same type |
I'll approve with a few tests and maybe a short docstring to clarify that this is an empty spmatrix. |
done |
This patch updates SparseArrays. In particular it contains JuliaSparse/SparseArrays.jl#260 which is necessary to make progress in #46759. All changes: - Fix ambiguities with Base. (JuliaSparse/SparseArrays.jl#268) - add == for vectors (JuliaSparse/SparseArrays.jl#248) - add undef initializers (JuliaSparse/SparseArrays.jl#263) - Make sure reductions benefit from sparsity (JuliaSparse/SparseArrays.jl#244) - Remove fkeep! from the documentation (JuliaSparse/SparseArrays.jl#261) - Fix direction of circshift (JuliaSparse/SparseArrays.jl#260) - Fix `vcat` of sparse vectors with numbers (JuliaSparse/SparseArrays.jl#253) - decrement should always return a vector (JuliaSparse/SparseArrays.jl#241) - change order of arguments in fkeep, fix bug with fixed elements (JuliaSparse/SparseArrays.jl#240) - Sparse matrix/vectors with fixed sparsity pattern. (JuliaSparse/SparseArrays.jl#201)
This patch updates SparseArrays. In particular it contains JuliaSparse/SparseArrays.jl#260 which is necessary to make progress in #46759. All changes: - Fix ambiguities with Base. (JuliaSparse/SparseArrays.jl#268) - add == for vectors (JuliaSparse/SparseArrays.jl#248) - add undef initializers (JuliaSparse/SparseArrays.jl#263) - Make sure reductions benefit from sparsity (JuliaSparse/SparseArrays.jl#244) - Remove fkeep! from the documentation (JuliaSparse/SparseArrays.jl#261) - Fix direction of circshift (JuliaSparse/SparseArrays.jl#260) - Fix `vcat` of sparse vectors with numbers (JuliaSparse/SparseArrays.jl#253) - decrement should always return a vector (JuliaSparse/SparseArrays.jl#241) - change order of arguments in fkeep, fix bug with fixed elements (JuliaSparse/SparseArrays.jl#240) - Sparse matrix/vectors with fixed sparsity pattern. (JuliaSparse/SparseArrays.jl#201)
This is useful to have a unified way to create sparse and dense vectors.
Will add tests if the feature is considered useful / needed