22 #include "pybind11/pybind11.h"
27 using namespace pybind11::literals;
34 py::module::import(
"lsst.sphgeom.pixelization");
35 py::module::import(
"lsst.sphgeom.region");
37 py::class_<Mq3cPixelization, Pixelization>
cls(mod,
"Mq3cPixelization");
39 cls.attr(
"MAX_LEVEL") = py::int_(Mq3cPixelization::MAX_LEVEL);
41 cls.def_static(
"level", &Mq3cPixelization::level);
42 cls.def_static(
"quad", &Mq3cPixelization::quad);
43 cls.def_static(
"neighborhood", &Mq3cPixelization::neighborhood);
44 cls.def_static(
"asString", &Mq3cPixelization::asString);
46 cls.def(py::init<int>(),
"level"_a);
47 cls.def(py::init<Mq3cPixelization const &>(),
"mq3cPixelization"_a);
52 [](Mq3cPixelization
const &
self, Mq3cPixelization
const &
other) {
53 return self.getLevel() ==
other.getLevel();
56 [](Mq3cPixelization
const &
self, Mq3cPixelization
const &
other) {
57 return self.getLevel() !=
other.getLevel();
59 cls.def(
"__repr__", [](Mq3cPixelization
const &
self) {
60 return py::str(
"Mq3cPixelization({!s})").format(
self.
getLevel());
62 cls.def(
"__reduce__", [
cls](Mq3cPixelization
const &
self) {
63 return py::make_tuple(
cls, py::make_tuple(
self.
getLevel()));