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

Function dot_product

tests/rps-test.py:202–203  ·  view source on GitHub ↗
(vec1, vec2)

Source from the content-addressed store, hash-verified

200
201
202def dot_product(vec1, vec2):
203 return sum(v1 * v2 for v1, v2 in zip(vec1, vec2))
204
205
206def magnitude(vec):

Callers 1

cosine_similarityFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected