Skip to content

Commit

Permalink
Update python.md (#600)
Browse files Browse the repository at this point in the history
I used `query` and `batch_query` in the docs but the actual methods are `search` and `batch_search` respectively.
  • Loading branch information
daxpryce authored Nov 25, 2024
1 parent e6afdbb commit 7d08e50
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions workflows/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ index = dap.StaticDiskIndex(
some_index: np.uint32 = ... # the index in our `q` array of points that we will be using to query on an individual basis
my_query_vector: np.typing.NDArray[my_dtype] = q[some_index] # make sure this is a 1-d array of the same dimensionality as your index!
# normalize if required by my_query_vector /= np.linalg.norm(my_query_vector)
internal_indices, distances = index.query(
internal_indices, distances = index.search(
query=my_query_vector,
k_neighbors=25,
complexity=50, # must be as big or bigger than `k_neighbors`
Expand All @@ -108,7 +108,7 @@ actual_identifiers = index_to_identifiers_map[internal_indices] # using np fanc
```python
import multiprocessing

internal_indices, distances = index.batch_query(
internal_indices, distances = index.batch_search(
queries=q,
k_neighbors=25,
complexity=50,
Expand Down

0 comments on commit 7d08e50

Please sign in to comment.