Skip to content

Commit bcc376e

Browse files
committed
changed ambiguous variable name
1 parent c08a982 commit bcc376e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lmm_tools/data/data.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ def search(self, query: str, top_k: int = 10) -> list[dict]:
8686
raise ValueError("Embedder not set yet")
8787

8888
query_embedding = self.emb.embed(query)
89-
_, I = self.index.search(query_embedding.reshape(1, -1), top_k)
90-
return self.df.iloc[I[0]].to_dict(orient="records")
89+
_, idx = self.index.search(query_embedding.reshape(1, -1), top_k)
90+
return self.df.iloc[idx[0]].to_dict(orient="records")
9191

9292
def save(self, path: str | Path) -> None:
9393
path = Path(path)

0 commit comments

Comments
 (0)