Skip to content

Commit

Permalink
used binary search on string indices
Browse files Browse the repository at this point in the history
  • Loading branch information
bjarthur committed Oct 26, 2023
1 parent b9162e1 commit 64cf739
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/LookupArrays/selector.jl
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ function at(
end
end
function at(
::Ordered, ::Span, lookup::LookupArray{<:Union{Number,Dates.TimeType}}, selval, atol, rtol::Nothing;
::Ordered, ::Span, lookup::LookupArray{<:Union{Number,Dates.TimeType,AbstractString}}, selval, atol, rtol::Nothing;
err=_True()
)
x = unwrap(selval)
Expand All @@ -163,7 +163,7 @@ function at(
end
end
end
# catch-all for an unordered or non-number index
# catch-all for an unordered index
function at(::Order, ::Span, lookup::LookupArray, selval, atol, rtol::Nothing; err=_True())
i = findfirst(x -> _is_at(x, unwrap(selval), atol), parent(lookup))
if i === nothing
Expand Down

0 comments on commit 64cf739

Please sign in to comment.