mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-14 21:57:15 +03:00
16 lines
366 B
Python
16 lines
366 B
Python
# coding: utf-8
|
|
from __future__ import unicode_literals
|
|
|
|
import numpy
|
|
import pytest
|
|
|
|
|
|
@pytest.mark.xfail
|
|
@pytest.mark.parametrize('text', ["Hello"])
|
|
def test_vocab_add_vector(en_vocab, text):
|
|
en_vocab.resize_vectors(10)
|
|
lex = en_vocab[text]
|
|
lex.vector = numpy.ndarray((10,), dtype='float32')
|
|
lex = en_vocab[text]
|
|
assert lex.vector.shape == (10,)
|