From 7d307d0bcc60db1bcb4a1bcfb40c1bc25e8e1731 Mon Sep 17 00:00:00 2001 From: Franklin <41602287+fcogidi@users.noreply.github.com> Date: Thu, 9 Nov 2023 18:08:15 -0500 Subject: [PATCH] Fix flatten_seq function to handle single character strings. --- cyclops/evaluate/metrics/experimental/utils/ops.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cyclops/evaluate/metrics/experimental/utils/ops.py b/cyclops/evaluate/metrics/experimental/utils/ops.py index 2072e9d62..e1dd09195 100644 --- a/cyclops/evaluate/metrics/experimental/utils/ops.py +++ b/cyclops/evaluate/metrics/experimental/utils/ops.py @@ -320,8 +320,8 @@ def flatten_seq(inp: Sequence[Any]) -> List[Any]: if len(inp) == 0: return [] - if len(inp) == 1: - return list(inp) + if isinstance(inp, str) and len(inp) == 1: + return [inp] result = [] for sublist in inp: