MCPcopy Create free account
hub / github.com/dblalock/bolt / dists_sq

Function dists_sq

experiments/python/utils.py:42–44  ·  view source on GitHub ↗
(X, q)

Source from the content-addressed store, hash-verified

40# ================================================================ distance
41
42def dists_sq(X, q):
43 diffs = X - q
44 return np.sum(diffs * diffs, axis=-1)
45
46
47def dists_l1(X, q):

Callers

nothing calls this directly

Calls 1

sumMethod · 0.45

Tested by

no test coverage detected