cupyx.scipy.linalg.companion

cupyx.scipy.linalg.companion(a)

Create a companion matrix.

Create the companion matrix associated with the polynomial whose coefficients are given in a.

Parameters

a (cupy.ndarray) – 1-D array of polynomial coefficients. The length of a must be at least two, and a[0] must not be zero.

Returns

The first row of the output is -a[1:]/a[0], and the

first sub-diagonal is all ones. The data-type of the array is the same as the data-type of -a[1:]/a[0].

Return type

(cupy.ndarray)