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

Function extend_vector_with_python_list

dlib/python/pybind_utils.h:68–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66
67 template <typename T>
68 void extend_vector_with_python_list (
69 std::vector<T> &v,
70 const py::list &l
71 )
72 /*!
73 ensures
74 - appends items from a python list to the end of std::vector<T>.
75 !*/
76 {
77 for (const auto &item : l)
78 v.push_back(item.cast<T>());
79 }
80
81// ----------------------------------------------------------------------------------------
82

Callers

nothing calls this directly

Calls 1

push_backMethod · 0.45

Tested by

no test coverage detected