From dc5106464d0230a497efde615930690d7540a803 Mon Sep 17 00:00:00 2001 From: Felix Cremer Date: Wed, 6 Sep 2023 11:53:21 +0200 Subject: [PATCH 1/3] Add refs to subtypes to Selector docstrings --- src/LookupArrays/selector.jl | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/LookupArrays/selector.jl b/src/LookupArrays/selector.jl index ee8d1a238..0fdbbdf18 100644 --- a/src/LookupArrays/selector.jl +++ b/src/LookupArrays/selector.jl @@ -28,6 +28,12 @@ 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 @@ -35,6 +41,12 @@ 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 From 562c0afb24a48ea6548434e6bc3d13b4393bb033 Mon Sep 17 00:00:00 2001 From: Felix Cremer Date: Wed, 6 Sep 2023 12:04:31 +0200 Subject: [PATCH 2/3] Clarify Contains docstring --- src/LookupArrays/selector.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/LookupArrays/selector.jl b/src/LookupArrays/selector.jl index 0fdbbdf18..914dbd46c 100644 --- a/src/LookupArrays/selector.jl +++ b/src/LookupArrays/selector.jl @@ -267,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). +Use `Where(contains(x))` to check for containment in the categorical values. ## Example From f078c14898bfacb0d09b2fb7099a291f96b1e971 Mon Sep 17 00:00:00 2001 From: Rafael Schouten Date: Tue, 26 Sep 2023 19:40:17 +0200 Subject: [PATCH 3/3] Update src/LookupArrays/selector.jl --- src/LookupArrays/selector.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LookupArrays/selector.jl b/src/LookupArrays/selector.jl index 914dbd46c..a494d411e 100644 --- a/src/LookupArrays/selector.jl +++ b/src/LookupArrays/selector.jl @@ -268,7 +268,7 @@ 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). -Use `Where(contains(x))` to check for containment in the categorical values. +`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