### Navigation

- index
- modules |
- modules |
- next |
- previous |
- NumPy v1.7 Manual (DRAFT) »
- NumPy Reference »
- Routines »
- Polynomials »
- Polynomial Package »
- Polynomial Module (`numpy.polynomial.polynomial`) »

# numpy.polynomial.polynomial.polyadd

`numpy.polynomial.polynomial.``polyadd`(c1, c2)

  Add one polynomial to another.

  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.

  See also

  `polysub`, `polymul`, `polydiv`, `polypow`

  Examples

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

### Navigation

- index
- modules |
- modules |
- next |
- previous |
- NumPy v1.7 Manual (DRAFT) »
- NumPy Reference »
- Routines »
- Polynomials »
- Polynomial Package »
- Polynomial Module (`numpy.polynomial.polynomial`) »