You are viewing an older version (2.4.3). Go to latest (2.4.4)
{ } Raw JSON

bundles / numpy 2.4.3 / numpy / polynomial / hermite / hermcompanion

function

numpy.polynomial.hermite:hermcompanion

source: /numpy/polynomial/hermite.py :1438

Signature

def   hermcompanion ( 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 a Hermite 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_like

1-D array of Hermite series coefficients ordered from low to high degree.

Returns

mat : ndarray

Scaled companion matrix of dimensions (deg, deg).

Examples

from numpy.polynomial.hermite import hermcompanion
hermcompanion([1, 0, 1])

Aliases

  • numpy.polynomial.hermite.hermcompanion