23 #include <pybind11/pybind11.h>
24 #include <pybind11/stl.h>
26 #include "numpy/arrayobject.h"
27 #include "ndarray/pybind11.h"
28 #include "ndarray/converter.h"
30 #include "lsst/pex/config/python.h"
37 namespace py = pybind11;
38 using namespace py::literals;
45 using ClsField = py::class_<TransformBoundedField, std::shared_ptr<TransformBoundedField>, BoundedField,
49 py::module mod(
"_transformBoundedField");
51 if (_import_array() < 0) {
52 PyErr_SetString(PyExc_ImportError,
"numpy.core.multiarray failed to import");
57 lsst::afw::table::io::python::declarePersistableFacade<TransformBoundedField>(mod,
58 "TransformBoundedField");
61 cls.def(py::init<lsst::afw::geom::Box2I const &, TransformBoundedField::Transform const &>(),
"bbox"_a,
64 cls.def(
"__mul__", &TransformBoundedField::operator*, py::is_operator());
65 cls.def(
"__eq__", &TransformBoundedField::operator==, py::is_operator());
67 cls.def(
"getTransform", &TransformBoundedField::getTransform);
68 cls.def(
"evaluate", (
double (BoundedField::*)(
double,
double)
const) & BoundedField::evaluate);
70 (ndarray::Array<double, 1, 1>(TransformBoundedField::*)(
71 ndarray::Array<double const, 1>
const &, ndarray::Array<double const, 1>
const &)
const) &
72 TransformBoundedField::evaluate);
74 TransformBoundedField::evaluate);
PYBIND11_PLUGIN(_cameraPoint)
py::class_< ChebyshevBoundedField, std::shared_ptr< ChebyshevBoundedField >, BoundedField > ClsField