Polynomials#

Power Series (cupy.polynomial.polynomial)#

Misc Functions#

polyvander(x, deg)

Computes the Vandermonde matrix of given degree.

polycompanion(c)

Computes the companion matrix of c.

polyval(x, c[, tensor])

Evaluate a polynomial at points x.

polyvalfromroots(x, r[, tensor])

Evaluate a polynomial specified by its roots at points x.

Polyutils#

Functions#

as_series(alist[, trim])

Returns argument as a list of 1-d arrays.

trimseq(seq)

Removes small polynomial series coefficients.

trimcoef(c[, tol])

Removes small trailing coefficients from a polynomial.

Poly1d#

Basics#

poly1d(c_or_r[, r, variable])

A one-dimensional polynomial class.

cupy.poly(seq_of_zeros)

Computes the coefficients of a polynomial with the given roots sequence.

polyval(p, x)

Evaluates a polynomial at specific values.

roots(p)

Computes the roots of a polynomial with given coefficients.

Fitting#

polyfit(x, y, deg[, rcond, full, w, cov])

Returns the least squares fit of polynomial of degree deg to the data y sampled at x.

Arithmetic#

polyadd(a1, a2)

Computes the sum of two polynomials.

polysub(a1, a2)

Computes the difference of two polynomials.

polymul(a1, a2)

Computes the product of two polynomials.