From 7d08e50983cfb61cc8ef2c61950c379b5f55bfad Mon Sep 17 00:00:00 2001 From: Dax Pryce Date: Mon, 25 Nov 2024 07:46:52 -0800 Subject: [PATCH] Update python.md (#600) I used `query` and `batch_query` in the docs but the actual methods are `search` and `batch_search` respectively. --- workflows/python.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workflows/python.md b/workflows/python.md index 2480f7f28..d009cd79f 100644 --- a/workflows/python.md +++ b/workflows/python.md @@ -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` @@ -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,