cupynumeric.roots#
- cupynumeric.roots(
- p: ndarray,
Return the roots of a polynomial with coefficients given in p.
The values in the rank-1 array p are coefficients of a polynomial. If the length of p is n+1 then the polynomial is described by:
p[0] * x**n + p[1] * x**(n-1) + ... + p[n-1]*x + p[n]
- Parameters:
p (array_like) – Rank-1 array of polynomial coefficients.
- Returns:
out – An array containing the roots of the polynomial.
- Return type:
- Raises:
ValueError – When p cannot be converted to a rank-1 array.
See also
Notes
The algorithm relies on computing the eigenvalues of the companion matrix [1]_. The eigenvalue computation itself is performed on a single GPU, even though other functions in this module may support multiple GPUs.
- Availability:
Single GPU, Multiple CPUs