From 58b043c1bc8eec8cd949457547a3bff8a9e0bad2 Mon Sep 17 00:00:00 2001 From: Ash Vardanian <1983160+ashvardanian@users.noreply.github.com> Date: Thu, 24 Aug 2023 09:41:34 +0200 Subject: [PATCH] Improve: Reporting `connectivity` in `repr` --- python/usearch/index.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/usearch/index.py b/python/usearch/index.py index 2bbdb9b1..fca4e4c7 100644 --- a/python/usearch/index.py +++ b/python/usearch/index.py @@ -1095,11 +1095,12 @@ def specs(self) -> Dict[str, Union[str, int, bool]]: } def __repr__(self) -> str: - f = "usearch.Index({} x {}, {}, expansion: {} & {}, {} vectors in {} levels)" + f = "usearch.Index({} x {}, {}, connectivity: {}, expansion: {} & {}, {} vectors in {} levels)" return f.format( self.dtype, self.ndim, self.metric, + self.connectivity, self.expansion_add, self.expansion_search, len(self), @@ -1117,6 +1118,7 @@ def _repr_pretty_(self, printer, cycle) -> str: f"-- data type: {self.dtype}", f"-- dimensions: {self.ndim}", f"-- metric: {self.metric}", + f"-- connectivity: {self.connectivity}", f"-- expansion on addition:{self.expansion_add} candidates", f"-- expansion on search: {self.expansion_search} candidates", "- binary",