22 #include "pybind11/pybind11.h"
23 #include "pybind11/stl.h"
25 #include "numpy/arrayobject.h"
26 #include "ndarray/pybind11.h"
31 namespace py = pybind11;
32 using namespace py::literals;
40 template <
class FromEndpo
int,
class ToEndpo
int>
41 void declareFunctionTemplates(py::module &mod) {
42 using Class = Transform<FromEndpoint, ToEndpoint>;
44 mod.def(
"linearizeTransform",
49 py::module mod(
"transformFactory");
51 py::module::import(
"lsst.afw.geom.transform");
54 if (_import_array() < 0) {
55 PyErr_SetString(PyExc_ImportError,
"numpy.core.multiarray failed to import");
59 declareFunctionTemplates<GenericEndpoint, GenericEndpoint>(mod);
60 declareFunctionTemplates<GenericEndpoint, Point2Endpoint>(mod);
61 declareFunctionTemplates<Point2Endpoint, GenericEndpoint>(mod);
62 declareFunctionTemplates<Point2Endpoint, Point2Endpoint>(mod);
PYBIND11_PLUGIN(_cameraPoint)
Transform< FromEndpoint, ToEndpoint > linearizeTransform(Transform< FromEndpoint, ToEndpoint > const &original, typename Transform< FromEndpoint, ToEndpoint >::FromPoint const &point)
Approximate a Transform by its local linearization.