Skip to content

Commit

Permalink
text func touchup
Browse files Browse the repository at this point in the history
  • Loading branch information
neggles committed Jan 27, 2024
1 parent fc279ea commit dd97e95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/neurosis/utils/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit dd97e95

Please sign in to comment.