You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
julia>using InfiniteArrays
julia>findfirst(==(9), 10:-1:-∞)
julia>findfirst(==(11), 10:-1:-∞)
0
julia>findfirst(==(21), 10:-1:-∞)
-10
julia> (10:-1:-∞)[-10]
ERROR: BoundsError: attempt to access ℵ₀-element InfiniteArrays.InfStepRange{Int64, Int64} with indices OneToInf() at index [-10]
Stacktrace:
[1] throw_boundserror(A::InfiniteArrays.InfStepRange{Int64, Int64}, I::Int64)
@ Base .\abstractarray.jl:737
[2] getindex(v::InfiniteArrays.InfStepRange{Int64, Int64}, i::Int64)
@ InfiniteArrays C:\Users\User\.julia\packages\InfiniteArrays\heAfT\src\infrange.jl:213
[3] top-level scope
@ REPL[18]:1
The text was updated successfully, but these errors were encountered:
DanielVandH
changed the title
findfirst doesn't work for ranges with negative step sizes
findfirst doesn't work for infranges with negative step sizes
Jun 17, 2024
The text was updated successfully, but these errors were encountered: