We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
julia> using InfiniteArrays julia> findfirst(isone, 1:∞) # works because it checks each element one at a time 1 julia> findfirst(isone, 2:∞) # never finds it, so hangs WARNING: Force throwing a SIGINT ERROR: InterruptException: Stacktrace: [1] getindex @ C:\Users\User\.julia\packages\InfiniteArrays\7v9AI\src\infrange.jl:0 [inlined] [2] findnext(testf::typeof(isone), A::InfiniteArrays.InfUnitRange{Int64}, start::Int64) @ Base .\array.jl:2155 [3] findfirst(testf::Function, A::InfiniteArrays.InfUnitRange{Int64}) @ Base .\array.jl:2206 [4] top-level scope @ REPL[9]:1 julia> ^C julia> findfirst(iszero, 0:∞) 1 julia> findfirst(iszero, 1:∞) WARNING: Force throwing a SIGINT ERROR: InterruptException: Stacktrace: [1] getindex @ C:\Users\User\.julia\packages\InfiniteArrays\7v9AI\src\infrange.jl:0 [inlined] [2] findnext(testf::typeof(iszero), A::InfiniteArrays.InfUnitRange{Int64}, start::Int64) @ Base .\array.jl:2155 [3] findfirst(testf::Function, A::InfiniteArrays.InfUnitRange{Int64}) @ Base .\array.jl:2206 [4] top-level scope @ REPL[11]:1 julia> findfirst(==(0), 1:∞) # efficient julia> findfirst(==(1), 2:∞)
These calls are a bit specific so not much of a priority, but the methods in
InfiniteArrays.jl/src/infrange.jl
Lines 580 to 601 in 0049f1b
could perhaps be used so that findfirst(iszero, <:InfRanges) uses findfirst(==(0), <:InfRanges) and similarly for isone.
findfirst(iszero, <:InfRanges)
findfirst(==(0), <:InfRanges)
isone
The text was updated successfully, but these errors were encountered:
issue JuliaArrays#178
c4c2b74
issue #178 (#179)
c45ae5f
Successfully merging a pull request may close this issue.
These calls are a bit specific so not much of a priority, but the methods in
InfiniteArrays.jl/src/infrange.jl
Lines 580 to 601 in 0049f1b
could perhaps be used so that
findfirst(iszero, <:InfRanges)
usesfindfirst(==(0), <:InfRanges)
and similarly forisone
.The text was updated successfully, but these errors were encountered: