Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Test
- std::vector<double> test_vec{1,2,3,4,5};
- py::list test_list = test_vec;
- py::list test_list2(test_vec);
- py::list test_list3 = py::cast<py::list>(test_vec);
- error: conversion from ‘std::vector<double>’ to non-scalar type ‘pybind11::list’ requested
- py::list test_list = test_vec;
- error: no matching function for call to ‘pybind11::list::list(std::vector<double>&)’
- py::list test_list2(test_vec);
- error: no matching function for call to ‘cast(std::vector<double>&)’
- py::list test_list3 = py::cast<py::list>(test_vec)
Add Comment
Please, Sign In to add comment