MCPcopy Index your code
hub / github.com/DeepLabCut/DeepLabCut / test_link

Function test_link

tests/test_inferenceutils.py:92–103  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

90
91
92def test_link():
93 pos1 = 1, 1
94 idx1 = 0
95 pos2 = 10, 10
96 idx2 = 1
97 conf = 0.5
98 j1 = inferenceutils.Joint(pos1, conf, idx=idx1)
99 j2 = inferenceutils.Joint(pos2, conf, idx=idx2)
100 link = inferenceutils.Link(j1, j2)
101 assert link.confidence == conf**2
102 assert link.idx == (idx1, idx2)
103 assert link.to_vector() == [*pos1, *pos2]
104
105
106def test_assembly():

Callers

nothing calls this directly

Calls 1

to_vectorMethod · 0.95

Tested by

no test coverage detected