From 2c2b1c8706780d2eac4e0f6db6d5d5cd5fc9c97d Mon Sep 17 00:00:00 2001 From: Adriane Boyd Date: Thu, 8 Dec 2022 16:23:15 +0100 Subject: [PATCH] Use int32 in array tests --- spacy/tests/doc/test_array.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spacy/tests/doc/test_array.py b/spacy/tests/doc/test_array.py index e2001824c..a1fb3f5b0 100644 --- a/spacy/tests/doc/test_array.py +++ b/spacy/tests/doc/test_array.py @@ -92,14 +92,14 @@ def test_doc_from_array_heads_in_bounds(en_vocab): # head before start arr = doc.to_array(["HEAD"]) - arr[0] = numpy.array(-1).astype(numpy.uint64) + arr[0] = numpy.int32(-1).astype(numpy.uint64) doc_from_array = Doc(en_vocab, words=words) with pytest.raises(ValueError): doc_from_array.from_array(["HEAD"], arr) # head after end arr = doc.to_array(["HEAD"]) - arr[0] = numpy.array(5).astype(numpy.uint64) + arr[0] = numpy.int32(5).astype(numpy.uint64) doc_from_array = Doc(en_vocab, words=words) with pytest.raises(ValueError): doc_from_array.from_array(["HEAD"], arr)