22 #include <pybind11/pybind11.h>
29 using namespace pybind11::literals;
35 py::module::import(
"astshim.mapping");
37 py::class_<CmpMap, std::shared_ptr<CmpMap>, Mapping>
cls(mod,
"CmpMap");
39 cls.def(py::init<Mapping const &, Mapping const &, bool, std::string const &>(),
"map1"_a,
"map2"_a,
40 "series"_a,
"options"_a =
"");
41 cls.def(py::init<CmpMap const &>());
43 cls.def(
"__getitem__", &CmpMap::operator[], py::is_operator());
44 cls.def(
"__len__", [](CmpMap
const &) {
return 2; });
46 cls.def(
"copy", &CmpMap::copy);
47 cls.def_property_readonly(
"series", &CmpMap::getSeries);