Skip to content

Commit

Permalink
Docstring and type annotation fixes; rename redundant overview.
Browse files Browse the repository at this point in the history
  • Loading branch information
LTLA committed Dec 9, 2024
1 parent a281c02 commit 3a633e9
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
```{toctree}
:maxdepth: 2
Overview <readme>
Usage <readme>
Contributions & Help <contributing>
License <license>
Authors <authors>
Expand Down
8 changes: 4 additions & 4 deletions src/knncolle/find_knn.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ def find_knn(
num_neighbors: Union[int, Sequence],
num_threads: int = 1,
subset: Optional[Sequence] = None,
get_index = True,
get_distance = True,
get_index: bool = True,
get_distance: bool = True,
**kwargs
) -> FindKnnResults:
"""Find the k-nearest neighbors for each observation.
Expand Down Expand Up @@ -99,8 +99,8 @@ def _find_knn_generic(
num_neighbors: Union[int, Sequence],
num_threads: int = 1,
subset: Optional[Sequence] = None,
get_index = True,
get_distance = True,
get_index: bool = True,
get_distance: bool = True,
**kwargs
) -> FindKnnResults:
num_neighbors, force_variable = process_num_neighbors(num_neighbors)
Expand Down
8 changes: 4 additions & 4 deletions src/knncolle/find_neighbors.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ def find_neighbors(
threshold: Union[float, Sequence],
num_threads: int = 1,
subset: Optional[Sequence] = None,
get_index = True,
get_distance = True,
get_index: bool = True,
get_distance: bool = True,
**kwargs
) -> FindNeighborsResults:
"""Find all neighbors within a certain distance for each observation.
Expand Down Expand Up @@ -89,8 +89,8 @@ def _find_neighbors_generic(
threshold: Union[int, Sequence],
num_threads: int = 1,
subset: Optional[Sequence] = None,
get_index = True,
get_distance = True,
get_index: bool = True,
get_distance: bool = True,
**kwargs
) -> FindNeighborsResults:
idx, dist = lib.generic_find_all(
Expand Down
8 changes: 4 additions & 4 deletions src/knncolle/query_knn.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ def query_knn(
query: numpy.ndarray,
num_neighbors: Union[int, Sequence],
num_threads: int = 1,
get_index = True,
get_distance = True,
get_index: bool = True,
get_distance: bool = True,
**kwargs
) -> QueryKnnResults:
"""Find the k-nearest neighbors in the search index for each observation in
Expand Down Expand Up @@ -90,8 +90,8 @@ def _query_knn_generic(
query: numpy.ndarray,
num_neighbors: Union[int, Sequence],
num_threads: int = 1,
get_index = True,
get_distance = True,
get_index: bool = True,
get_distance: bool = True,
**kwargs
) -> QueryKnnResults:
num_neighbors, force_variable = process_num_neighbors(num_neighbors)
Expand Down
8 changes: 4 additions & 4 deletions src/knncolle/query_neighbors.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ def query_neighbors(
threshold: Union[float, Sequence],
num_threads: int = 1,
subset: Optional[Sequence] = None,
get_index = True,
get_distance = True,
get_index: bool = True,
get_distance: bool = True,
**kwargs
) -> QueryNeighborsResults:
"""Find all observations in the search index that lie within a threshold
Expand Down Expand Up @@ -82,8 +82,8 @@ def _query_neighbors_generic(
query: numpy.ndarray,
threshold: Union[float, Sequence],
num_threads: int = 1,
get_index = True,
get_distance = True,
get_index: bool = True,
get_distance: bool = True,
**kwargs
) -> QueryNeighborsResults:
idx, dist = lib.generic_query_all(
Expand Down
2 changes: 1 addition & 1 deletion src/knncolle/vptree.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def __init__(self, ptr):

@property
def ptr(self):
"""Pointer to a prebuilt index, see :py:meth:`~__init-_`."""
"""Pointer to a prebuilt index, see :py:meth:`~__init__`."""
return self._ptr


Expand Down

0 comments on commit 3a633e9

Please sign in to comment.