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

Document Contains for Categoricals more clearly #534

Merged
merged 3 commits into from
Sep 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/LookupArrays/selector.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,25 @@ abstract type Selector{T} end
IntSelector <: Selector

Abstract supertype for [`Selector`](@ref)s that return a single `Int` index.

IntSelectors provided by DimensionalData are:

- [`At`](@ref)
- [`Contains`](@ref)
- [`Near`](@ref)
"""
abstract type IntSelector{T} <: Selector{T} end

"""
ArraySelector <: Selector

Abstract supertype for [`Selector`](@ref)s that return an `AbstractArray`.

ArraySelectors provided by DimensionalData are:

- [`Between`](@ref)
- [`Touches`](@ref)
- [`Where`](@ref)
"""
abstract type ArraySelector{T} <: Selector{T} end

Expand Down Expand Up @@ -255,6 +267,8 @@ Selector that selects the interval the value is contained by. If the
interval is not present in the index, an error will be thrown.

Can only be used for [`Intervals`](@ref) or [`Categorical`](@ref).
For [`Categorical`](@ref) it falls back to using [`At`](@ref).
`Contains` should not be confused with `Base.contains` - use `Where(contains(x))` to check for if values are contain in categorical values like strings.

## Example

Expand Down
Loading