Use int32 in array tests

This commit is contained in:
Adriane Boyd 2022-12-08 16:23:15 +01:00
parent f1fe6a7081
commit 2c2b1c8706

View File

@ -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)