Compute the roots of a Hermite series.
Return the roots (a.k.a “zeros”) of the Hermite series represented by cs, which is the sequence of coefficients from lowest order “term” to highest, e.g., [1,2,3] is the series L_0 + 2*L_1 + 3*L_2.
Parameters : | cs : array_like
|
---|---|
Returns : | out : ndarray
|
See also
polyroots, chebroots
Notes
Algorithm(s) used:
Remember: because the Hermite series basis set is different from the “standard” basis set, the results of this function may not be what one is expecting.
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])