mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
* Fix import for numpy
This commit is contained in:
parent
fc36bcf458
commit
28c659c1fe
|
@ -2,6 +2,7 @@ from __future__ import unicode_literals
|
||||||
|
|
||||||
from spacy.tokens import Doc
|
from spacy.tokens import Doc
|
||||||
from spacy.en import English
|
from spacy.en import English
|
||||||
|
import numpy
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
@ -155,7 +156,7 @@ def test_merge_hang():
|
||||||
text = 'through North and South Carolina'
|
text = 'through North and South Carolina'
|
||||||
EN = English(parser=False)
|
EN = English(parser=False)
|
||||||
doc = EN(text, tag=True)
|
doc = EN(text, tag=True)
|
||||||
heads = np.asarray([[0, 3, -1, -2, -4]], dtype='int32')
|
heads = numpy.asarray([[0, 3, -1, -2, -4]], dtype='int32')
|
||||||
doc.from_array([HEAD], heads.T)
|
doc.from_array([HEAD], heads.T)
|
||||||
doc.merge(18, 32, '', '', 'ORG')
|
doc.merge(18, 32, '', '', 'ORG')
|
||||||
doc.merge(8, 32, '', '', 'ORG')
|
doc.merge(8, 32, '', '', 'ORG')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user