Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/davisking/dlib
/ test_vector_init_with_number
Function
test_vector_init_with_number
tools/python/test/test_vector.py:17–22 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
15
16
17
def
test_vector_init_with_number():
18
v = vector(3)
19
assert len(v) == 3
20
assert v.shape == (3, 1)
21
assert str(v) ==
"0\n0\n0"
22
assert repr(v) ==
"dlib.vector([0, 0, 0])"
23
24
25
def
test_vector_set_size():
Callers
nothing calls this directly
Calls
4
vector
Class · 0.90
len
Function · 0.85
str
Class · 0.85
repr
Function · 0.85
Tested by
no test coverage detected