In boost::python, to wrap a vector<T> you would do something like this:
boost::python
vector<T>
boost::python::class_< std::vector < T > >("T") .def(boost::python::vector_indexing_suite<std::vector< T > >());
How do I accomplish the same thing in nanobind?
Include the header <nanobind/stl/bind_vector.h> and then its just:
<nanobind/stl/bind_vector.h>
nb::bind_vector<std::vector<T> >(m, "T");
Include the header
<nanobind/stl/bind_vector.h>
and then its just: