Skip to content

Commit

Permalink
Improve documentation of cpdist (#373)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasryde authored Apr 7, 2024
1 parent 8ea9723 commit d14bb68
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions docs/Usage/process.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ cdist
----------
.. autofunction:: rapidfuzz.process.cdist

cpdist
----------
.. autofunction:: rapidfuzz.process.cpdist

extract
-------
.. autofunction:: rapidfuzz.process.extract
Expand Down
6 changes: 3 additions & 3 deletions src/rapidfuzz/process_py.py
Original file line number Diff line number Diff line change
Expand Up @@ -686,14 +686,14 @@ def cpdist(
scorer_kwargs: dict[str, Any] | None = None,
) -> np.ndarray:
"""
Compute pairwise distance/similarity between corresponding elements in the two collection of inputs.
Compute the pairwise distance/similarity between corresponding elements of the queries & choices.
Parameters
----------
queries : Collection[Sequence[Hashable]]
list of all strings the queries
list of strings used to compute the distance/similarity.
choices : Collection[Sequence[Hashable]]
list of all pairwise strings the query should be compared. Must be the same length as the queries.
list of strings the queries should be compared with. Must be the same length as the queries.
scorer : Callable, optional
Optional callable that is used to calculate the matching score between
the query and each choice. This can be any of the scorers included in RapidFuzz
Expand Down

0 comments on commit d14bb68

Please sign in to comment.