{ } Raw JSON

bundles / numpy 2.4.4 / numpy / polynomial / chebyshev / chebroots

function

numpy.polynomial.chebyshev:chebroots

source: /numpy/polynomial/chebyshev.py :1666

Signature

def   chebroots ( c )

Summary

Compute the roots of a Chebyshev series.

Extended Summary

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

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 out is also real, otherwise it is complex.

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 Chebyshev series basis polynomials aren't powers of x so the results of this function may seem unintuitive.

Examples

import numpy.polynomial.chebyshev as cheb
cheb.chebroots((-1, 1,-1, 1)) # T3 - T2 + T1 - T0 has real roots

See also

numpy.polynomial.hermite.hermroots
numpy.polynomial.hermite_e.hermeroots
numpy.polynomial.laguerre.lagroots
numpy.polynomial.legendre.legroots
numpy.polynomial.polynomial.polyroots

Aliases

  • numpy.polynomial.Chebyshev._roots
  • numpy.polynomial.chebyshev.chebroots