Skip to content

Commit

Permalink
Tests: Fix deprecated scalar conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianeboyd committed Aug 11, 2023
1 parent dcfb779 commit 6743db8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spacy_transformers/tests/test_alignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 6743db8

Please sign in to comment.