SparseArrays.jl
SparseArrays.jl copied to clipboard
SparseArrays.jl is a Julia stdlib
This is a problem on both 1.8.3 and nightly: ```julia julia> using SparseArrays julia> s = spzeros(30, 5); for i in eachindex(s); if rand() < .4; s[i] = 1; s[i]...
```julia julia> sort!(sprand(1000, 1000, .01), dims=1) ERROR: `reinterpret` on sparse arrays is discontinued. Try reinterpreting the value itself instead. Stacktrace: [1] error(s::String) @ Base ./error.jl:35 [2] reinterpret(#unused#::Type, A::SparseVector{Float64, Int64}) @...
I have a Unitful sparse array that I would like to `reinterpret` as a non-unitful sparse array so that I can pass it to a method that sadly will not...
If `A` has more columns than rows, we should compute the `QR` factorization of `A'` such that we recover an LQ factorization of `A`.
For almost any value and assignable expression in Julia, this holds: ```julia expr = value @assert expr === value ``` I wish this held, too: ```julia v = spzeros(1) value...
Right now we're thinking about changing the `MethodError` message. Unfortunately, this breaks a lot of tests, including this one. Discussion at https://github.com/JuliaLang/julia/pull/47369. ~~If the change below does happen, merge this...
It would be awesome if `dropzeros!` were extended so the following pattern worked: ```julia # create a sparse array a = rand(4, 3) as = sparse(a) # loop over columns...
```julia julia> using SparseArrays julia> x = SparseVector{Int, UInt8}(6, UInt8[1], [-1]) 6-element SparseVector{Int64, UInt8} with 1 stored entry: [1] = -1 julia> sum(x) -1 julia> versioninfo() Julia Version 1.6.7 Commit...