From 36f994c73d095fb71add51975d265bd82d6fa480 Mon Sep 17 00:00:00 2001 From: Andrey Stebenkov Date: Fri, 16 Aug 2024 16:22:23 +0300 Subject: [PATCH] Fix bug with test_correct_api_dataset_with_text_preprocessing by update col_type regex rule for str* --- fedot/preprocessing/preprocessing.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fedot/preprocessing/preprocessing.py b/fedot/preprocessing/preprocessing.py index bc0661495c..1444e0287f 100644 --- a/fedot/preprocessing/preprocessing.py +++ b/fedot/preprocessing/preprocessing.py @@ -1,3 +1,4 @@ +import re from copy import copy from typing import Optional, Union @@ -568,7 +569,7 @@ def reduce_mem_usage_np(arr, initial_types): col = col.astype(init_type) col_type = col.dtype.name - if col_type not in ['object', 'str32', 'str96', 'str128', 'str160', 'str384']: + if col_type not in ['object'] and not bool(re.match(r'str\d*$', col_type)): c_min = col.max() c_max = col.max()