* Fix import for numpy

This commit is contained in:
Matthew Honnibal 2016-01-18 17:25:04 +01:00
parent fc36bcf458
commit 28c659c1fe

View File

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