This is a pre-release version (2.5.0.dev0+git20251130.2de293a). Go to latest (2.4.4)
{ } Raw JSON

bundles / numpy 2.5.0.dev0+git20251130.2de293a / numpy / polynomial / polynomial / polyadd

function

numpy.polynomial.polynomial:polyadd

source: build-install/usr/lib/python3.14/site-packages/numpy/polynomial/polynomial.py :215

Signature

def   polyadd ( c1 c2 )

Summary

Add one polynomial to another.

Extended Summary

Returns the sum of two polynomials c1 + c2. The arguments are sequences of coefficients from lowest order term to highest, i.e., [1,2,3] represents the polynomial 1 + 2*x + 3*x**2.

Parameters

c1, c2 : array_like

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

Returns

out : ndarray

The coefficient array representing their sum.

Examples

from numpy.polynomial import polynomial as P
c1 = (1, 2, 3)
c2 = (3, 2, 1)
sum = P.polyadd(c1,c2); sum
P.polyval(2, sum)  # 4 + 4(2) + 4(2**2)

See also

polydiv
polymul
polymulx
polypow
polysub

Aliases

  • numpy.polynomial.Polynomial._add
  • numpy.polynomial.polynomial.polyadd