### Navigation

- index
- modules |
- modules |
- next |
- previous |
- SciPy v0.12 Reference Guide (DRAFT) »
- Interpolation (`scipy.interpolate`) »

# scipy.interpolate.lagrange

`scipy.interpolate.``lagrange`(x, w)

  Return a Lagrange interpolating polynomial.

  Given two 1-D arrays x and w, returns the Lagrange interpolating polynomial through the points `(x, w)`.

  Warning: This implementation is numerically unstable. Do not expect to be able to use more than about 20 points even if they are chosen optimally.

  Parameters : | x : array_like x represents the x-coordinates of a set of datapoints. w : array_like w represents the y-coordinates of a set of datapoints, i.e. f(x).
  Returns : | lagrange : numpy.poly1d instance The Lagrange interpolating polynomial.

### Navigation

- index
- modules |
- modules |
- next |
- previous |
- SciPy v0.12 Reference Guide (DRAFT) »
- Interpolation (`scipy.interpolate`) »