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_<Q3cPixelization, Pixelization>
cls(mod,
"Q3cPixelization");
39 cls.attr(
"MAX_LEVEL") = py::int_(Q3cPixelization::MAX_LEVEL);
41 cls.def(py::init<int>(),
"level"_a);
42 cls.def(py::init<Q3cPixelization const &>(),
"q3cPixelization"_a);
45 cls.def(
"quad", &Q3cPixelization::quad);
46 cls.def(
"neighborhood", &Q3cPixelization::neighborhood);
49 [](Q3cPixelization
const &
self, Q3cPixelization
const &
other) {
50 return self.getLevel() ==
other.getLevel();
53 [](Q3cPixelization
const &
self, Q3cPixelization
const &
other) {
54 return self.getLevel() !=
other.getLevel();
56 cls.def(
"__repr__", [](Q3cPixelization
const &
self) {
57 return py::str(
"Q3cPixelization({!s})").format(
self.
getLevel());
59 cls.def(
"__reduce__", [
cls](Q3cPixelization
const &
self) {
60 return py::make_tuple(
cls, py::make_tuple(
self.
getLevel()));