From 87c8f66dd479c95383c9ca619c799fa890ff9691 Mon Sep 17 00:00:00 2001 From: "Anthony D. Blaom" Date: Fri, 27 Sep 2024 09:39:14 +1200 Subject: [PATCH] ensure ordinal encoder returns concrete type --- src/encoders.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/encoders.jl b/src/encoders.jl index 4d00d2d..31818ab 100644 --- a/src/encoders.jl +++ b/src/encoders.jl @@ -67,7 +67,7 @@ function ordinal_encoder_transform(X, mapping_matrix) test_levels = levels(col) check_unkown_levels(train_levels, test_levels) level2scalar = mapping_matrix[ind] - new_col = recode(unwrap.(col), level2scalar...) + new_col = [recode(unwrap.(col), level2scalar...)...] push!(new_feats, new_col) else push!(new_feats, col)