MCPcopy Create free account
hub / github.com/davisking/dlib / list_to_mat

Function list_to_mat

tools/python/src/global_optimization.cpp:29–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29matrix<double,0,1> list_to_mat(
30 const py::list& l
31)
32{
33 matrix<double,0,1> result(len(l));
34 for (long i = 0; i < result.size(); ++i)
35 result(i) = l[i].cast<double>();
36 return result;
37}
38
39py::list mat_to_list (
40 const matrix<double,0,1>& m

Callers 7

py_find_max_globalFunction · 0.85
py_find_max_global2Function · 0.85
py_find_min_globalFunction · 0.85
py_find_min_global2Function · 0.85
py_function_spec1Function · 0.85
py_function_spec2Function · 0.85
py_function_evaluationFunction · 0.85

Calls 2

lenFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected