numpy 1.22.4 Pypi GitHub Homepage
Other Docs
NotesParametersReturnsBackRef
hermroots(c)

Return the roots (a.k.a. "zeros") of the polynomial

$$p(x) = \sum_i c[i] * H_i(x).$$

Notes

The root estimates are obtained as the eigenvalues of the companion matrix, Roots far from the origin of the complex plane may have large errors due to the numerical instability of the series for such values. Roots with multiplicity greater than 1 will also show larger errors as the value of the series near such points is relatively insensitive to errors in the roots. Isolated roots near the origin can be improved by a few iterations of Newton's method.

The Hermite series basis polynomials aren't powers of :None:None:`x` so the results of this function may seem unintuitive.

Parameters

c : 1-D array_like

1-D array of coefficients.

Returns

out : ndarray

Array of the roots of the series. If all the roots are real, then :None:None:`out` is also real, otherwise it is complex.

Compute the roots of a Hermite series.

See Also

numpy.polynomial.chebyshev.chebroots
numpy.polynomial.hermite_e.hermeroots
numpy.polynomial.laguerre.lagroots
numpy.polynomial.legendre.legroots
numpy.polynomial.polynomial.polyroots

Examples

>>> from numpy.polynomial.hermite import hermroots, hermfromroots
... coef = hermfromroots([-1, 0, 1])
... coef array([0. , 0.25 , 0. , 0.125])
>>> hermroots(coef)
array([-1.00000000e+00, -1.38777878e-17,  1.00000000e+00])
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

numpy.polynomial.hermite_e.hermeroots numpy.polynomial.chebyshev.chebroots numpy.polynomial.polynomial.polyroots numpy.polynomial.legendre.legroots numpy.polynomial.laguerre.lagroots

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /numpy/polynomial/hermite.py#1452
type: <class 'function'>
Commit: