From de5bdd1423e1f3f35c369e027e93ddac92c14c0d Mon Sep 17 00:00:00 2001 From: Quentin Lhoest Date: Fri, 25 Oct 2024 16:00:28 +0200 Subject: [PATCH] again --- src/datasets/utils/tf_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/datasets/utils/tf_utils.py b/src/datasets/utils/tf_utils.py index 2de35a943e7..154f4d61072 100644 --- a/src/datasets/utils/tf_utils.py +++ b/src/datasets/utils/tf_utils.py @@ -278,7 +278,7 @@ def __init__( self.cols_to_retain = cols_to_retain self.collate_fn = collate_fn self.collate_fn_args = collate_fn_args - self.string_columns = [col for col, dtype in columns_to_np_types.items() if dtype in (np.unicode_, np.str_)] + self.string_columns = [col for col, dtype in columns_to_np_types.items() if dtype is np.str_] # Strings will be converted to arrays of single unicode chars, so that we can have a constant itemsize self.columns_to_np_types = { col: dtype if col not in self.string_columns else np.dtype("U1")