LSSTApplications  20.0.0
LSSTDataManagementBasePackage
Functions
spline.cc File Reference
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include "lsst/afw/math/detail/Spline.h"

Go to the source code of this file.

Functions

 PYBIND11_MODULE (spline, mod)
 

Function Documentation

◆ PYBIND11_MODULE()

PYBIND11_MODULE ( spline  ,
mod   
)

Definition at line 34 of file spline.cc.

34  {
35  /* Module level */
36  py::class_<Spline> clsSpline(mod, "Spline");
37  py::class_<TautSpline, Spline> clsTautSpline(mod, "TautSpline");
38 
39  /* Member types and enums */
40  py::enum_<TautSpline::Symmetry>(clsTautSpline, "Symmetry")
41  .value("Unknown", TautSpline::Symmetry::Unknown)
42  .value("Odd", TautSpline::Symmetry::Odd)
43  .value("Even", TautSpline::Symmetry::Even)
44  .export_values();
45 
46  /* Constructors */
47 
48  /* Operators */
49 
50  /* Members */
51  clsSpline.def("interpolate", &Spline::interpolate);
52  clsSpline.def("derivative", &Spline::derivative);
53 
54  clsTautSpline.def(py::init<std::vector<double> const&, std::vector<double> const&, double const,
56  "x"_a, "y"_a, "gamma"_a = 0, "type"_a = lsst::afw::math::detail::TautSpline::Unknown);
57  clsTautSpline.def("roots", &TautSpline::roots);
58 }
std::vector< double >
lsst::afw::math::detail::TautSpline::Symmetry
Symmetry
Definition: Spline.h:61
lsst::afw::math::detail::TautSpline::Unknown
@ Unknown
Definition: Spline.h:61
lsst::utils.tests.init
def init()
Definition: tests.py:58