mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-05 12:50:20 +03:00
Remove unnecessary conversion from attr_t
This commit is contained in:
parent
eb0e3c5006
commit
0ce5d190ff
|
@ -981,7 +981,7 @@ cdef class Doc:
|
|||
for i in range(self.length):
|
||||
token = &self.c[i]
|
||||
for j in range(nr_attr):
|
||||
c_output[i*nr_attr + j] = numpy.array(get_token_attr(token, c_attr_ids[j])).astype(numpy.uint64)
|
||||
c_output[i*nr_attr + j] = get_token_attr(token, c_attr_ids[j])
|
||||
# Handle 1d case
|
||||
return output if len(attr_ids) >= 2 else output.reshape((self.length,))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user