Return the companion matrix of c.
The companion matrix for power series cannot be made symmetric by scaling the basis, so this function differs from those for the orthogonal polynomials.
1-D array of polynomial coefficients ordered from low to high degree.
Companion matrix of dimensions (deg, deg).
>>> from numpy.polynomial import polynomial as P
>>> c = (1, 2, 3)
>>> P.polycompanion(c)
array([[ 0. , -0.33333333],
[ 1. , -0.66666667]])
© 2005–2024 NumPy Developers
Licensed under the 3-clause BSD License.
https://numpy.org/doc/2.4/reference/generated/numpy.polynomial.polynomial.polycompanion.html