mirror of https://github.com/explosion/spaCy.git
* Fix api of array method
This commit is contained in:
parent
ed0ff63c09
commit
ab61673edd
|
@ -32,7 +32,7 @@ cdef class Tokens:
|
||||||
|
|
||||||
cdef int push_back(self, int i, LexemeOrToken lex_or_tok) except -1
|
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:
|
cdef class Token:
|
||||||
|
|
|
@ -75,7 +75,7 @@ cdef class Tokens:
|
||||||
return idx + t.lex.length
|
return idx + t.lex.length
|
||||||
|
|
||||||
@cython.boundscheck(False)
|
@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 int i, j
|
||||||
cdef attr_id_t feature
|
cdef attr_id_t feature
|
||||||
cdef np.ndarray[long, ndim=2] output
|
cdef np.ndarray[long, ndim=2] output
|
||||||
|
|
Loading…
Reference in New Issue