bundles / numpy 2.4.4 / numpy / polynomial / legendre / legcompanion
function
numpy.polynomial.legendre:legcompanion
Signature
def legcompanion ( c ) Summary
Return the scaled companion matrix of c.
Extended Summary
The basis polynomials are scaled so that the companion matrix is symmetric when c is an Legendre basis polynomial. This provides better eigenvalue estimates than the unscaled case and for basis polynomials the eigenvalues are guaranteed to be real if numpy.linalg.eigvalsh is used to obtain them.
Parameters
c: array_like1-D array of Legendre series coefficients ordered from low to high degree.
Returns
mat: ndarrayScaled companion matrix of dimensions (deg, deg).
Aliases
-
numpy.polynomial.legendre.legcompanion