cplx_newton_basins — MATH complex op

• Datenarten: signal → labels2d

• Aufruf: import fullseye as fs; fs.ledger.cplx_newton_basins(coeffs, centre=0j, half_width=2.0, shape=(256, 256), max_iter=64, tol=1e-10) (die Implementierung direkt: import mathops; mathops.cplx_newton_basins(coeffs, centre=0j, half_width=2.0, shape=(256, 256), max_iter=64, tol=1e-10); aus dem Register: opsmath.get("cplx_newton_basins"))

Verwendung

In welche Wurzel eines Polynoms fällt das Newton-Verfahren von jedem Punkt aus?

> Die ausführliche Beschreibung unten ist der Originaltext — Zusammenfassung und Überschriften sind übersetzt.

Labels the window `1..len(roots) by the root reached, and 0` where the

iteration has not converged within `max_iter` (the Julia set and its

neighbourhood). Roots come from `numpy.roots` — the same routine behind

this family's `poly_roots — and are sorted by (Re, Im)` so the label

of a given root does not change between runs.

★**Degree 2 has a closed-form answer, so the operator can be checked

exactly rather than plausibly.** Cayley (1879): for `z**2 - 1` the basins

are the two open half-planes `Re z > 0 and Re z < 0`, and the boundary

is the imaginary axis — no fractal. The famous fractal boundary appears at

degree 3, which Cayley could not settle; there the honest checks are

structural (every root's basin is non-empty; `z**3 - 1` is invariant under

rotation by `2*pi/3`, and so is its labelling, up to the cyclic

relabelling of the roots).

`coeffs is highest-degree-first, as numpy.roots and poly_roots`

take it.

Raises `ValueError`: text, non-finite or all-zero coefficients; a

non-zero constant (no roots); `max_iter < 1; tol <= 0`; degenerate

window. Points where the derivative vanishes are left unconverged (label

`0`) rather than divided by — a critical point is genuinely undecided.

HALCON: no operator.

Familienweiter Eingabevertrag (fail-closed)

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.

Ausführlicher Anwendungsleitfaden

• Leitfaden zur Familie math_metrology

Referenzen (Beispieldaten, Literatur)

• 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.

Ausführbare Beispiele (verifizierte Samples, die diesen Operator wirklich aufrufen)

• poc_complex_plane_fields — py -3.11 examples/poc_complex_plane_fields.py

Typkompatible Folge-Operatoren (nehmen labels2d als Eingabe)

—

Gleiche Kategorie (complex)

cplx_contour_circle · cplx_poly_eval · cplx_contour_integral · cplx_winding_number · cplx_cauchy_value · cplx_argument_principle · cplx_laurent_coeffs · cplx_joukowski


*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.