Skip to content
This repository was archived by the owner on Sep 9, 2026. It is now read-only.

Commit ca7d599

Browse files
author
Joan Fontanals Martinez
committed
fix: pass limit as integer
Signed-off-by: Joan Fontanals Martinez <joan.martinez@jina.ai>
1 parent 4e7e262 commit ca7d599

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎docarray/utils/find.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ class MyDocument(BaseDoc):
226226
metric_fn = getattr(comp_backend.Metrics, metric)
227227
dists = metric_fn(query_embeddings, index_embeddings, device=device)
228228
top_scores, top_indices = comp_backend.Retrieval.top_k(
229-
dists, k=limit, device=device, descending=descending
229+
dists, k=int(limit), device=device, descending=descending
230230
)
231231

232232
batched_docs: List[DocList] = []

0 commit comments

Comments
 (0)