Merging 'master' into 'wrap'

release/4.3a0
Fan Jiang 2020-10-07 01:42:57 -04:00
commit 2c51730dbb
2 changed files with 6 additions and 6 deletions

View File

@ -74,8 +74,8 @@ class PybindWrapper(object):
) )
.def("deserialize", .def("deserialize",
[]({class_inst} self, string serialized){{ []({class_inst} self, string serialized){{
return gtsam::deserialize(serialized, self); gtsam::deserialize(serialized, *self);
}}) }}, py::arg("serialized"))
'''.format(class_inst=cpp_class + '*')) '''.format(class_inst=cpp_class + '*'))
is_method = isinstance(method, instantiator.InstantiatedMethod) is_method = isinstance(method, instantiator.InstantiatedMethod)

View File

@ -45,8 +45,8 @@ PYBIND11_MODULE(geometry_py, m_) {
) )
.def("deserialize", .def("deserialize",
[](gtsam::Point2* self, string serialized){ [](gtsam::Point2* self, string serialized){
return gtsam::deserialize(serialized, self); gtsam::deserialize(serialized, *self);
}) }, py::arg("serialized"))
; ;
py::class_<gtsam::Point3, std::shared_ptr<gtsam::Point3>>(m_gtsam, "Point3") py::class_<gtsam::Point3, std::shared_ptr<gtsam::Point3>>(m_gtsam, "Point3")
@ -59,8 +59,8 @@ PYBIND11_MODULE(geometry_py, m_) {
) )
.def("deserialize", .def("deserialize",
[](gtsam::Point3* self, string serialized){ [](gtsam::Point3* self, string serialized){
return gtsam::deserialize(serialized, self); gtsam::deserialize(serialized, *self);
}) }, py::arg("serialized"))
.def_static("staticFunction",[](){return gtsam::Point3::staticFunction();}) .def_static("staticFunction",[](){return gtsam::Point3::staticFunction();})
.def_static("StaticFunctionRet",[]( double z){return gtsam::Point3::StaticFunctionRet(z);}, py::arg("z")); .def_static("StaticFunctionRet",[]( double z){return gtsam::Point3::StaticFunctionRet(z);}, py::arg("z"));