Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/davisking/dlib
/ test_dot
Function
test_dot
tools/python/test/test_vector.py:85–91 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
83
84
85
def
test_dot():
86
v1 = vector([1, 0])
87
v2 = vector([0, 1])
88
v3 = vector([-1, 0])
89
assert dot(v1, v1) == 1
90
assert dot(v1, v2) == 0
91
assert dot(v1, v3) == -1
92
93
94
def
test_vector_serialization():
Callers
nothing calls this directly
Calls
2
vector
Class · 0.90
dot
Function · 0.90
Tested by
no test coverage detected