SparseArrays.jl
SparseArrays.jl copied to clipboard
SparseArrays.jl is a Julia stdlib
Calling `reverse` on a sparse array introduces structural nonzeros. Here's a minimal example ``` julia> a = SparseMatrixCSC(2, 2, [1,3,4], [1,2,1], [1,1,1]) 2×2 SparseMatrixCSC{Int64, Int64} with 3 stored entries: 1...
This patch adds `SparseArrays.spzeros!`, which is to `spzeros` what `SparseArrays.sparse!` is to `sparse`. This reverts the changes in `sparse` from https://github.com/JuliaSparse/SparseArrays.jl/pull/284 and instead hook up `spzeros`, and the new `SparseArrays.spzeros!`...
With this patch the output buffers to `sparse!` are resized in order to satisfy the buffer length checks in the `SparseMatrixCSC` constructor that were introduced in JuliaLang/julia#40523. Previously `csccolptr` was...
https://github.com/JuliaLang/julia/pull/40523 introduced buffer checks in the inner constructor which breaks this code: ```julia using SparseArrays Tv, Ti = Float64, Int I = Ti[1, 1, 2, 3] J = Ti[1, 1,...
For vector `sv=sprand(n,0.2)`: ```julia Vector: n = 16 master: 119.365 ns (1 allocation: 192 bytes) pr: 45.455 ns (1 allocation: 192 bytes) Vector: n = 65536 master: 2.682 ms (2...
I don't know why this didn't come up earlier, but the size of the Q factor was missing. This now popped up in https://github.com/JuliaLang/julia/pull/46196. It can be removed once that...
I noticed that the `rfn` argument of `sprand` was poorly documented: 1. We didn't say what its arguments should be. 2. We didn't say clearly that it defaults to `rand`...
`getindex` on structural zeros uses `zero(T)`. `setindex!`, `dropzeros!`, and `==` use `iszero(T)`. It would be nice to know which operations are required for full functionality for SparseArrays, and what subset...
- assign on `mysparsearray[index] = v` whenever `v !== zero(eltype(sparsecollection))` - stop prohibiting `reinterpret` Similar to @StefanKarpinski's suggestion [here](https://github.com/JuliaSparse/SparseArrays.jl/discussions/69#discussioncomment-1980166) Fixes #289 Fixes #294 Fixes #304 Fixes #305 The primary motivation...
```julia julia> x = sprand(10, .1) 10-element SparseVector{Float64, Int64} with 1 stored entry: [3 ] = 0.850332 julia> sort!(x) 10-element SparseVector{Float64, Int64} with 8 stored entries: [3 ] = 0.0...