From 8636f9c8c28d91a7e9fbe8253b4f7a82993c686e Mon Sep 17 00:00:00 2001 From: tiemvanderdeure Date: Tue, 3 Dec 2024 12:48:03 +0100 Subject: [PATCH] include DataType in CategoricalEltypes --- src/Lookups/lookup_arrays.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Lookups/lookup_arrays.jl b/src/Lookups/lookup_arrays.jl index 4d8210a50..b9ae79fc0 100644 --- a/src/Lookups/lookup_arrays.jl +++ b/src/Lookups/lookup_arrays.jl @@ -470,7 +470,7 @@ abstract type AbstractCategorical{T,O} <: Aligned{T,O} end order(lookup::AbstractCategorical) = lookup.order metadata(lookup::AbstractCategorical) = lookup.metadata -const CategoricalEltypes = Union{AbstractChar,Symbol,AbstractString} +const CategoricalEltypes = Union{AbstractChar,Symbol,AbstractString,DataType} function Adapt.adapt_structure(to, l::AbstractCategorical) rebuild(l; data=Adapt.adapt(to, parent(l)), metadata=NoMetadata())