diff --git a/python/gtsam/preamble.h b/python/gtsam/preamble.h index f8e5804d0..6542343cb 100644 --- a/python/gtsam/preamble.h +++ b/python/gtsam/preamble.h @@ -1,3 +1,5 @@ +// Please refer to: https://pybind11.readthedocs.io/en/stable/advanced/cast/stl.html +// These are required to save one copy operation on Python calls PYBIND11_MAKE_OPAQUE(std::vector); PYBIND11_MAKE_OPAQUE(std::vector >); PYBIND11_MAKE_OPAQUE(std::vector); diff --git a/python/gtsam/specializations.h b/python/gtsam/specializations.h index c1114059b..e23534c85 100644 --- a/python/gtsam/specializations.h +++ b/python/gtsam/specializations.h @@ -1,3 +1,5 @@ +// Please refer to: https://pybind11.readthedocs.io/en/stable/advanced/cast/stl.html +// These are required to save one copy operation on Python calls py::bind_vector >(m_, "KeyVector"); py::bind_vector > >(m_, "Point2Vector"); py::bind_vector >(m_, "Pose3Vector");