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

Function matrix_double__getitem__

tools/python/src/matrix.cpp:175–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173}
174
175mat_row matrix_double__getitem__(matrix<double>& m, long r)
176{
177 if (r < 0) {
178 r = m.nr() + r; // negative index
179 }
180 if (r > m.nr()-1 || r < 0) {
181 PyErr_SetString( PyExc_IndexError, (string("2 index out of range, got ") + cast_to_string(r)).c_str()
182 );
183 throw py::error_already_set();
184 }
185 return mat_row(&m(r,0),m.nc());
186}
187
188
189py::tuple get_matrix_size(matrix<double>& m)

Callers

nothing calls this directly

Calls 4

cast_to_stringFunction · 0.85
mat_rowClass · 0.85
nrMethod · 0.45
ncMethod · 0.45

Tested by

no test coverage detected