* Fix import for numpy

This commit is contained in:
Matthew Honnibal 2016-01-18 17:25:04 +01:00
parent fc36bcf458
commit 28c659c1fe
1 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@ from __future__ import unicode_literals
from spacy.tokens import Doc
from spacy.en import English
import numpy
import pytest
@ -155,7 +156,7 @@ def test_merge_hang():
text = 'through North and South Carolina'
EN = English(parser=False)
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.merge(18, 32, '', '', 'ORG')
doc.merge(8, 32, '', '', 'ORG')