Guest User

Untitled

a guest
Dec 11th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. // Test
  2. std::vector<double> test_vec{1,2,3,4,5};
  3. py::list test_list = test_vec;
  4. py::list test_list2(test_vec);
  5. py::list test_list3 = py::cast<py::list>(test_vec);
  6.  
  7. error: conversion from ‘std::vector<double>’ to non-scalar type ‘pybind11::list’ requested
  8. py::list test_list = test_vec;
  9.  
  10. error: no matching function for call to ‘pybind11::list::list(std::vector<double>&)’
  11. py::list test_list2(test_vec);
  12.  
  13. error: no matching function for call to ‘cast(std::vector<double>&)’
  14. py::list test_list3 = py::cast<py::list>(test_vec)
Add Comment
Please, Sign In to add comment