mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-13 10:46:29 +03:00
Auto-format code with black (#9284)
Co-authored-by: explosion-bot <explosion-bot@users.noreply.github.com>
This commit is contained in:
parent
6bb0324b81
commit
4da2af4e0e
|
@ -428,9 +428,9 @@ def test_span_with_vectors(doc):
|
||||||
]
|
]
|
||||||
add_vecs_to_vocab(doc.vocab, vectors)
|
add_vecs_to_vocab(doc.vocab, vectors)
|
||||||
# 0-length span
|
# 0-length span
|
||||||
assert_array_equal(ops.to_numpy(doc[0:0].vector), numpy.zeros((3, )))
|
assert_array_equal(ops.to_numpy(doc[0:0].vector), numpy.zeros((3,)))
|
||||||
# longer span with no vector
|
# longer span with no vector
|
||||||
assert_array_equal(ops.to_numpy(doc[0:4].vector), numpy.zeros((3, )))
|
assert_array_equal(ops.to_numpy(doc[0:4].vector), numpy.zeros((3,)))
|
||||||
# single-token span with vector
|
# single-token span with vector
|
||||||
assert_array_equal(ops.to_numpy(doc[10:11].vector), [-1, -1, -1])
|
assert_array_equal(ops.to_numpy(doc[10:11].vector), [-1, -1, -1])
|
||||||
doc.vocab.vectors = prev_vectors
|
doc.vocab.vectors = prev_vectors
|
||||||
|
|
Loading…
Reference in New Issue
Block a user