Skip to content

Commit

Permalink
Fix flatten_seq function to handle single character strings.
Browse files Browse the repository at this point in the history
  • Loading branch information
fcogidi committed Nov 9, 2023
1 parent 16c59de commit 7d307d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cyclops/evaluate/metrics/experimental/utils/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 7d307d0

Please sign in to comment.