From dd97e95eb2d8df1c5ec7a17ab9b4c7951456ba41 Mon Sep 17 00:00:00 2001 From: Andi Powers-Holmes Date: Sat, 27 Jan 2024 08:02:50 +0000 Subject: [PATCH] text func touchup --- src/neurosis/utils/text.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/neurosis/utils/text.py b/src/neurosis/utils/text.py index 872b9d2..5deabc7 100644 --- a/src/neurosis/utils/text.py +++ b/src/neurosis/utils/text.py @@ -4,7 +4,7 @@ def np_text_decode(text: np.bytes_ | str | list, aslist: bool = False): if not isinstance(text, list): text = [text] - text = [x.decode("utf-8") if isinstance(x, np.bytes_) else x for x in text] + text = [x.decode("utf-8") if isinstance(x, (np.bytes_, bytes)) else x for x in text] if len(text) == 1 and not aslist: text = text[0] return text