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

Function cv__setitem__

tools/python/src/vector.cpp:80–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78
79
80void cv__setitem__(cv& c, long p, double val)
81{
82 if (p < 0) {
83 p = c.size() + p; // negative index
84 }
85 if (p > c.size()-1) {
86 PyErr_SetString( PyExc_IndexError, "index out of range"
87 );
88 throw py::error_already_set();
89 }
90 c(p) = val;
91}
92
93double cv__getitem__(cv& m, long r)
94{

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected