Squashed 'wrap/' changes from 5e1373486..2192b194e

2192b194e Merge pull request #8 from borglab/fix/serialization
3a3461a35 Fix test
ce3d5c35d Fix serialization

git-subtree-dir: wrap
git-subtree-split: 2192b194edc35142e529adcf50ed5e6803d48975
release/4.3a0
Fan Jiang 2020-10-07 01:42:57 -04:00
parent f79a1fb2b3
commit f9e7c7d942
2 changed files with 6 additions and 6 deletions

View File

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

View File

@ -45,8 +45,8 @@ PYBIND11_MODULE(geometry_py, m_) {
)
.def("deserialize",
[](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")
@ -59,8 +59,8 @@ PYBIND11_MODULE(geometry_py, m_) {
)
.def("deserialize",
[](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("StaticFunctionRet",[]( double z){return gtsam::Point3::StaticFunctionRet(z);}, py::arg("z"));