numpy.polynomial.laguerre.lagroots

numpy.polynomial.laguerre.lagroots(cs)

Compute the roots of a Laguerre series.

Return the roots (a.k.a “zeros”) of the Laguerre 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

1-d array of Laguerre series coefficients ordered from low to high.

Returns :

out : ndarray

Array of the roots. If all the roots are real, then so is the dtype of out; otherwise, out‘s dtype is complex.

See also

polyroots, chebroots

Notes

Algorithm(s) used:

Remember: because the Laguerre 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.laguerre import lagroots, lagfromroots
>>> coef = lagfromroots([0, 1, 2])
>>> coef
array([  2.,  -8.,  12.,  -6.])
>>> lagroots(coef)
array([ -4.44089210e-16,   1.00000000e+00,   2.00000000e+00])

Next topic

numpy.polynomial.laguerre.lagfromroots

This Page