complex op• Data kinds: signal × cpoints → cpoints
• Call: import mathops; mathops.cplx_poly_eval(coeffs, z) (or opsmath.get("cplx_poly_eval"))
Evaluate a polynomial on the complex plane (Horner, complex-capable).
The complex twin of :func:poly_eval: *coeffs* is highest-power-first
(`[c_d, ..., c_1, c_0]`, possibly complex) and *z* is a complex scalar or
1-D array. A scalar query returns a Python `complex`, an array returns
`complex128 — mirroring :func:poly_eval`'s scalar/array behaviour.
This is what makes the rest of the family usable: sample a polynomial on a
contour from :func:cplx_contour_circle, then count its zeros with
:func:cplx_argument_principle or reconstruct interior values with
:func:cplx_cauchy_value. (:func:poly_eval refuses complex input by
design — silent imaginary-part truncation — so it cannot serve here.)
Raises `ValueError`: empty/multi-dimensional *coeffs*, non-finite or
masked input, over-cap size, and — the honest one — a result that
overflowed to Inf/NaN (a degree-200 polynomial on `|z| = 10` genuinely
exceeds float64 range; that is refused rather than returned as `inf`).
HALCON: no complex polynomial operator.
Every mathops op validates its input before computing (nothing slips through silently):
• **complex input raises ValueError** — coercing to float64 silently discards the imaginary part (numpy only emits a ComplexWarning and returns a plausible-looking wrong real number). State .real/.imag/abs() explicitly, or use complexops, which handles complex data.
• **masked arrays with masked elements raise ValueError** — the implicit conversion that peels off the mask and uses the raw values underneath is refused. Say explicitly whether to fill or to drop.
• **NaN/Inf raises ValueError on every input** (refused with the count stated — it propagates through the whole result).
• Shapes are strict: 1-D and 2-D are never implicitly promoted or broadcast (a matrix in a vector slot, or a vector in a matrix slot, raises ValueError; reshape explicitly).
• Size cap: ops that take a matrix, and the stat_histogram bins, raise ValueError beyond mathops.MAX_ELEMENTS (2^26 ≈ 67 million elements).
• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).
• Operator provenance and references — the sources of the research/methods this op family came from.
• The canonical algorithm (author, year) and its uses are named in the family usage guide above.
• math_complex — py -3.11 examples/math_complex.py
cpoints as input)cplx_contour_integral · cplx_winding_number · cplx_cauchy_value · cplx_argument_principle · cplx_laurent_coeffs · cplx_joukowski · cplx_mobius
complex)cplx_contour_circle · cplx_contour_integral · cplx_winding_number · cplx_cauchy_value · cplx_argument_principle · cplx_laurent_coeffs · cplx_joukowski · cplx_mobius
*Provenance: mathops.py — MATH operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.