-
Notifications
You must be signed in to change notification settings - Fork 28
Closed
Description
using SortingAlgorithms, OffsetArrays
sort!(OffsetArray(rand(1000), -500); alg=RadixSort)With julia --check-bounds=yes, I get
ERROR: BoundsError: attempt to access 1000-element OffsetArray(::Vector{Float64}, -499:500) with eltype Float64 with indices -499:500 at index [770]
Stacktrace:
[1] throw_boundserror(A::OffsetVector{Float64, Vector{Float64}}, I::Tuple{Int64})
@ Base ./abstractarray.jl:691
[2] checkbounds
@ ./abstractarray.jl:656 [inlined]
[3] setindex!
@ ~/.julia/packages/OffsetArrays/aKeSs/src/OffsetArrays.jl:444 [inlined]
[4] _setindex!
@ ./abstractarray.jl:1334 [inlined]
[5] setindex!
@ ./abstractarray.jl:1315 [inlined]
[6] sort!(vs::OffsetVector{Float64, Vector{Float64}}, lo::Int64, hi::Int64, ::SortingAlgorithms.RadixSortAlg, o::Base.Order.ForwardOrdering, ts::OffsetVector{Float64, Vector{Float64}})
@ SortingAlgorithms ~/.julia/packages/SortingAlgorithms/PEcBU/src/SortingAlgorithms.jl:101
[7] sort!
@ ~/.julia/packages/SortingAlgorithms/PEcBU/src/SortingAlgorithms.jl:66 [inlined]
[8] fpsort!
@ ~/.julia/packages/SortingAlgorithms/PEcBU/src/SortingAlgorithms.jl:131 [inlined]
[9] sort!
@ ./sort.jl:1234 [inlined]
[10] #sort!#8
@ ./sort.jl:725 [inlined]
[11] top-level scope
@ REPL[5]:1
Metadata
Metadata
Assignees
Labels
No labels