From ab61673edd4a44c804983b22e48de4d1c061478f Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Tue, 23 Dec 2014 15:18:48 +1100 Subject: [PATCH] * Fix api of array method --- spacy/tokens.pxd | 2 +- spacy/tokens.pyx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spacy/tokens.pxd b/spacy/tokens.pxd index 35796d8e0..bc94744ab 100644 --- a/spacy/tokens.pxd +++ b/spacy/tokens.pxd @@ -32,7 +32,7 @@ cdef class Tokens: cdef int push_back(self, int i, LexemeOrToken lex_or_tok) except -1 - cpdef np.ndarray[long, ndim=2] get_array(self, list features) + cpdef np.ndarray[long, ndim=2] to_array(self, object features) cdef class Token: diff --git a/spacy/tokens.pyx b/spacy/tokens.pyx index 16f9d3c20..2e9fd4369 100644 --- a/spacy/tokens.pyx +++ b/spacy/tokens.pyx @@ -75,7 +75,7 @@ cdef class Tokens: return idx + t.lex.length @cython.boundscheck(False) - cpdef np.ndarray[long, ndim=2] get_array(self, list attr_ids): + cpdef np.ndarray[long, ndim=2] to_array(self, object attr_ids): cdef int i, j cdef attr_id_t feature cdef np.ndarray[long, ndim=2] output