37 py::class_<Interpolate, std::shared_ptr<Interpolate>> clsInterpolate(mod,
"Interpolate");
38 py::enum_<Interpolate::Style>(clsInterpolate,
"Style")
39 .value(
"UNKNOWN", Interpolate::Style::UNKNOWN)
40 .value(
"CONSTANT", Interpolate::Style::CONSTANT)
41 .value(
"LINEAR", Interpolate::Style::LINEAR)
42 .value(
"NATURAL_SPLINE", Interpolate::Style::NATURAL_SPLINE)
43 .value(
"CUBIC_SPLINE", Interpolate::Style::CUBIC_SPLINE)
44 .value(
"CUBIC_SPLINE_PERIODIC", Interpolate::Style::CUBIC_SPLINE_PERIODIC)
45 .value(
"AKIMA_SPLINE", Interpolate::Style::AKIMA_SPLINE)
46 .value(
"AKIMA_SPLINE_PERIODIC", Interpolate::Style::AKIMA_SPLINE_PERIODIC)
47 .value(
"NUM_STYLES", Interpolate::Style::NUM_STYLES)
50 clsInterpolate.def(
"interpolate", [](
Interpolate &t,
double const x) {
58 clsInterpolate.def(
"interpolate",
60 Interpolate::interpolate);
63 (ndarray::Array<double, 1> (
Interpolate::*)(ndarray::Array<double const, 1>
const &)
const) &
64 Interpolate::interpolate);
66 mod.def(
"makeInterpolate",
69 "x"_a,
"y"_a,
"style"_a = Interpolate::AKIMA_SPLINE);
71 ndarray::Array<double const, 1>
const &
y,
73 "x"_a,
"y"_a,
"style"_a = Interpolate::AKIMA_SPLINE);