From 1442efd448bc8ef7bb3aa90e6d95dda4c4522d6c Mon Sep 17 00:00:00 2001 From: Dax Pryce Date: Fri, 8 Nov 2024 13:31:56 -0800 Subject: [PATCH] Update python.md 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,