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

Function make_matrix_from_size

tools/python/src/matrix.cpp:37–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37std::shared_ptr<matrix<double> > make_matrix_from_size(long nr, long nc)
38{
39 if (nr < 0 || nc < 0)
40 {
41 PyErr_SetString( PyExc_IndexError, "Input dimensions can't be negative."
42 );
43 throw py::error_already_set();
44 }
45 auto temp = std::make_shared<matrix<double>>(nr,nc);
46 *temp = 0;
47 return temp;
48}
49
50
51std::shared_ptr<matrix<double> > from_object(py::object obj)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected