cupyx.scipy.linalg.companion¶
-
cupyx.scipy.linalg.companion(a)[source]¶ 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
amust be at least two, anda[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].
- The first row of the output is
- Return type
See also