From fb47e7194992af4bb2084d36e3507aa8b37602ae Mon Sep 17 00:00:00 2001 From: Andre Zayarni <926368+azayarni@users.noreply.github.com> Date: Fri, 25 Oct 2024 10:45:56 +0200 Subject: [PATCH] typo in code --- qdrant-landing/content/articles/sparse-vectors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qdrant-landing/content/articles/sparse-vectors.md b/qdrant-landing/content/articles/sparse-vectors.md index 8d4c91c94..82ef6619b 100644 --- a/qdrant-landing/content/articles/sparse-vectors.md +++ b/qdrant-landing/content/articles/sparse-vectors.md @@ -347,7 +347,7 @@ query_vec, query_tokens = compute_vector(query_text) query_vec.shape query_indices = query_vec.nonzero().numpy().flatten() -query_values = query_vec.detach().numpy()[indices] +query_values = query_vec.detach().numpy()[query_indices] ``` In this example, we use the same model for both document and query. This is not a requirement, but it's a simpler approach.