NumPy

Previous topic

numpy.polynomial.polynomial.polyvander3d

Next topic

numpy.polynomial.polynomial.polyfit

This is documentation for an old release of NumPy (version 1.19). Read this page in the documentation of the latest stable release (version 2.2).

numpy.polynomial.polynomial.polycompanion

numpy.polynomial.polynomial.polycompanion(c)[source]

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.

Parameters
carray_like

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

Returns
matndarray

Companion matrix of dimensions (deg, deg).

Notes

New in version 1.7.0.