From 4d64ea8f694140759bd3e7e81ab1d6349b57f6aa Mon Sep 17 00:00:00 2001 From: Dante Gama Dessavre Date: Wed, 7 Feb 2024 11:44:26 -0600 Subject: [PATCH] FIX correction of building a list instead of squeezing when index is built from 1 element --- python/cuml/preprocessing/encoders.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/cuml/preprocessing/encoders.py b/python/cuml/preprocessing/encoders.py index c1dc8c6451..46500b766a 100644 --- a/python/cuml/preprocessing/encoders.py +++ b/python/cuml/preprocessing/encoders.py @@ -498,7 +498,7 @@ def inverse_transform(self, X): dropped_class_idx = Series(self.drop_idx_[feature]) dropped_class_mask = Series(cats).isin(cats[dropped_class_idx]) if len(cats) == 1: - inv = Series(Index(cp.squeeze(cats[0])).repeat(X.shape[0])) + inv = Series(Index([cats[0]]).repeat(X.shape[0])) result[feature] = inv continue cats = cats[~dropped_class_mask]