MCPcopy Create free account
hub / github.com/MinishLab/vicinity / __init__

Method __init__

vicinity/backends/basic.py:232–235  ·  view source on GitHub ↗

Initialize the Euclidean basic backend.

(self, vectors: npt.NDArray, arguments: BasicArgs)

Source from the content-addressed store, hash-verified

230
231class EuclideanBasicBackend(BasicBackend):
232 def __init__(self, vectors: npt.NDArray, arguments: BasicArgs) -> None:
233 """Initialize the Euclidean basic backend."""
234 super().__init__(vectors=vectors, arguments=arguments)
235 self.squared_norm_vectors = (self._vectors**2).sum(1)
236
237 def _update_precomputed_data(self) -> None:
238 """Update precomputed data for Euclidean distance."""

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected