From 6743db85142ce6b285f665ad0626c2e2183ab8fd Mon Sep 17 00:00:00 2001 From: Adriane Boyd Date: Fri, 11 Aug 2023 15:40:41 +0200 Subject: [PATCH] Tests: Fix deprecated scalar conversion --- spacy_transformers/tests/test_alignment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy_transformers/tests/test_alignment.py b/spacy_transformers/tests/test_alignment.py index 1696521e..295d35b1 100644 --- a/spacy_transformers/tests/test_alignment.py +++ b/spacy_transformers/tests/test_alignment.py @@ -52,7 +52,7 @@ def test_alignments_match(words1, words2): assert len(unique_tokens) == align.lengths.shape[0] flat_words1, flat_words2 = flatten_strings(words1, words2) for i, word in enumerate(flat_words1): - wp_word = "".join([flat_words2[int(j)] for j in align[i].data]) + wp_word = "".join([flat_words2[int(j[0])] for j in align[i].data]) if len(word) < len(wp_word): assert word in wp_word elif len(word) > len(wp_word):