MCPcopy Create free account
hub / github.com/cosdata/cosdata / magnitude

Function magnitude

tests/load-test.py:214–215  ·  view source on GitHub ↗
(vec)

Source from the content-addressed store, hash-verified

212
213
214def magnitude(vec):
215 return np.sqrt(sum(v**2 for v in vec))
216
217
218def cosine_similarity(vec1, vec2):

Callers 1

cosine_similarityFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected