| 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 |