mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-12 02:06:31 +03:00
Update docstrings
This commit is contained in:
parent
44bce8e53f
commit
5683fd65ed
|
@ -184,17 +184,18 @@ cdef class Vectors:
|
||||||
yield key, self.data[row]
|
yield key, self.data[row]
|
||||||
|
|
||||||
def find(self, *, key=None, keys=None, row=None, rows=None):
|
def find(self, *, key=None, keys=None, row=None, rows=None):
|
||||||
'''Lookup one or more keys by row, or vice versa.
|
"""Look up one or more keys by row, or vice versa.
|
||||||
|
|
||||||
key (unicode / int): Find the row that the given key points to.
|
key (unicode / int): Find the row that the given key points to.
|
||||||
Returns int, -1 if missing.
|
Returns int, -1 if missing.
|
||||||
keys (sequence): Find rows that the keys point to.
|
keys (iterable): Find rows that the keys point to.
|
||||||
Returns ndarray.
|
Returns ndarray.
|
||||||
row (int): Find the first key that point to the row.
|
row (int): Find the first key that point to the row.
|
||||||
Returns int.
|
Returns int.
|
||||||
rows (sequence): Find the first keys that points to the rows.
|
rows (iterable): Find the keys that point to the rows.
|
||||||
Returns ndarray.
|
Returns ndarray.
|
||||||
'''
|
RETURNS: The requested key, keys, row or rows.
|
||||||
|
"""
|
||||||
if sum(arg is None for arg in (key, keys, row, rows)) != 3:
|
if sum(arg is None for arg in (key, keys, row, rows)) != 3:
|
||||||
raise ValueError("One (and only one) keyword arg must be set.")
|
raise ValueError("One (and only one) keyword arg must be set.")
|
||||||
xp = get_array_module(self.data)
|
xp = get_array_module(self.data)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user