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

Function np_to_mat

tools/python/src/decision_functions.cpp:83–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81}
82
83inline matrix<double,0,1> np_to_mat(
84 const py::array_t<double>& samp
85)
86{
87 matrix<double,0,1> temp(samp.size());
88
89 const auto data = samp.data();
90 for (long i = 0; i < temp.size(); ++i)
91 temp(i) = data[i];
92 return temp;
93}
94
95template <typename decision_function>
96double normalized_predict (

Callers 1

normalized_predict_npFunction · 0.85

Calls 2

sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected