Return the scaled companion matrix of c.
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.
1-D array of Hermite series coefficients ordered from low to high degree.
Scaled companion matrix of dimensions (deg, deg).
>>> from numpy.polynomial.hermite import hermcompanion
>>> hermcompanion([1, 0, 1])
array([[0. , 0.35355339],
[0.70710678, 0. ]])
© 2005–2024 NumPy Developers
Licensed under the 3-clause BSD License.
https://numpy.org/doc/2.4/reference/generated/numpy.polynomial.hermite.hermcompanion.html