interp_poly op• Datenarten: signal × signal × signal → signal
• Aufruf: import mathops; mathops.interp_cubic(x, y, xq, out_of_range='raise', bc_type='not-a-knot') (oder opsmath.get("interp_cubic"))
Kubische Spline-Interpolation (`scipy.interpolate.CubicSpline`).
> Die ausführliche Beschreibung unten ist der Originaltext — Zusammenfassung und Überschriften sind übersetzt.
C²-smooth through all nodes — the step up from :func:interp_linear when
the underlying curve is smooth (a lens-distortion or gamma curve). Needs at
least 4 points. *bc_type* is the boundary condition: `'not-a-knot'`
(default — reproduces a global cubic polynomial *exactly*, the property the
tests pin), `'natural'` (zero second derivative at the ends; slightly
smoother-looking, but it will NOT reproduce a cubic), or `'clamped'`.
Same strict grid and the same explicit *out_of_range* policy as
:func:interp_linear ('raise' by default, 'clamp' to hold end values) —
spline extrapolation diverges cubically and is refused outright.
Honest note: between nodes a spline can overshoot (it is a minimum-
curvature interpolant, not shape-preserving); for monotone data whose
interpolant must stay monotone, use a PCHIP-type method instead — not
provided here, stated so nobody assumes otherwise.
HALCON: no cubic tuple interpolation operator (`create_funct_1d_pairs`
feeds linear interpolation only).
Jeder mathops-Operator prüft seine Eingabe vor der Berechnung (nichts rutscht stillschweigend durch):
• **Komplexe Eingaben lösen ValueError aus** — die Umwandlung nach float64 verwirft den Imaginärteil stillschweigend (numpy meldet nur eine ComplexWarning und liefert eine plausibel aussehende, falsche reelle Zahl). Schreiben Sie .real/.imag/abs() explizit oder nutzen Sie complexops.
• **Masked Arrays mit maskierten Elementen lösen ValueError aus** — die implizite Umwandlung, die die Maske abstreift und die Rohwerte darunter verwendet, wird abgelehnt. Geben Sie explizit an, ob gefüllt oder verworfen wird.
• **NaN/Inf löst bei jeder Eingabe ValueError aus** (mit Anzahl abgelehnt — es pflanzt sich durch das gesamte Ergebnis fort).
• Formen sind strikt: 1-D und 2-D werden nie implizit hochgestuft oder gebroadcastet (eine Matrix im Vektor-Slot oder ein Vektor im Matrix-Slot löst ValueError aus; reshapen Sie explizit).
• Größenobergrenze: Operatoren, die eine Matrix nehmen, sowie die stat_histogram-Bins lösen jenseits von mathops.MAX_ELEMENTS (2^26 ≈ 67 Mio. Elemente) ValueError aus.
• Leitfaden zur Familie math_metrology
• Katalog der Beispieldaten (Download-URLs / Lizenzen) — 2-D nutzt skimage.data (BSD/Public Domain) plus synthetische Bilder, 3-D nennt Download-URLs echter Datenquellen (Stanford, PDS, …).
• Herkunft und Literatur der Operatoren — die Quellen der Forschung/Verfahren, auf denen diese Operatorfamilie beruht.
• Der kanonische Algorithmus (Autor, Jahr) und seine Anwendungen stehen im Familienleitfaden oben.
• math_metrology — py -3.11 examples/math_metrology.py
signal als Eingabe)mat_solve · mat_lstsq · stat_describe · stat_histogram · stat_zscore · interp_linear · poly_fit · poly_eval
interp_poly)interp_linear · poly_fit · poly_eval · poly_roots
*Provenance: mathops.py — MATH Operator-Registry. Diese Notiz wird von tools/opdocs.py md erzeugt (nicht von Hand bearbeiten).*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.