Skip to content
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

sort!(::SparseMatrixCSC) throws on Julia nightly [regression] #304

Closed
LilithHafner opened this issue Nov 28, 2022 · 0 comments · Fixed by #296
Closed

sort!(::SparseMatrixCSC) throws on Julia nightly [regression] #304

LilithHafner opened this issue Nov 28, 2022 · 0 comments · Fixed by #296
Labels
bug Something isn't working

Comments

@LilithHafner
Copy link
Member

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})
   @ SparseArrays /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/stdlib/v1.9/SparseArrays/src/abstractsparse.jl:79
 [3] sort!(v::SubArray{Float64, 1, SparseMatrixCSC{Float64, Int64}, Tuple{Base.Slice{Base.OneTo{Int64}}, Int64}, false}, lo::Int64, hi::Int64, ::Base.Sort.AdaptiveSortAlg, o::Base.Sort.Float.Right, t::SparseVector{Float64, Int64})
   @ Base.Sort ./sort.jl:860
 [4] fpsort!(v::SubArray{Float64, 1, SparseMatrixCSC{Float64, Int64}, Tuple{Base.Slice{Base.OneTo{Int64}}, Int64}, false}, a::Base.Sort.AdaptiveSortAlg, o::Base.Order.ForwardOrdering, t::SparseVector{Float64, Int64})
   @ Base.Sort.Float ./sort.jl:1590
 [5] sort!
   @ ./sort.jl:1597 [inlined]
 [6] _sort!(A::SparseMatrixCSC{Float64, Int64}, #unused#::Val{1}, alg::Base.Sort.AdaptiveSortAlg, order::Base.Order.ForwardOrdering, buffer::SparseVector{Float64, Int64})
   @ Base.Sort ./sort.jl:1352
 [7] sort!(A::SparseMatrixCSC{Float64, Int64}; dims::Int64, alg::Base.Sort.AdaptiveSortAlg, lt::Function, by::Function, rev::Nothing, order::Base.Order.ForwardOrdering, buffer::SparseVector{Float64, Int64})
   @ Base.Sort ./sort.jl:1339
 [8] kwcall(::NamedTuple{(:dims,), Tuple{Int64}}, ::typeof(sort!), A::SparseMatrixCSC{Float64, Int64})
   @ Base.Sort ./sort.jl:1331
 [9] top-level scope
   @ REPL[5]:1
@LilithHafner LilithHafner added the bug Something isn't working label Nov 29, 2022
@LilithHafner LilithHafner changed the title sort!(::SparseMatrixCSC) throws on Julia nightly [bug] [regression] sort!(::SparseMatrixCSC) throws on Julia nightly [regression] Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant