Skip to content

Commit 9ab9e1f

Browse files
authored
Improve: Variadic args for Index.restore (#600)
1 parent e414f46 commit 9ab9e1f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

python/usearch/index.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ def metadata(path_or_buffer: PathOrBuffer) -> Optional[dict]:
604604
raise e
605605

606606
@staticmethod
607-
def restore(path_or_buffer: PathOrBuffer, view: bool = False) -> Optional[Index]:
607+
def restore(path_or_buffer: PathOrBuffer, view: bool = False, **kwargs) -> Optional[Index]:
608608
meta = Index.metadata(path_or_buffer)
609609
if not meta:
610610
return None
@@ -613,6 +613,7 @@ def restore(path_or_buffer: PathOrBuffer, view: bool = False) -> Optional[Index]
613613
ndim=meta["dimensions"],
614614
dtype=meta["kind_scalar"],
615615
metric=meta["kind_metric"],
616+
**kwargs,
616617
)
617618

618619
if view:

0 commit comments

Comments
 (0)