#### Previous topic

scipy.interpolate.bisplev

#### Next topic

scipy.interpolate.approximate_taylor_polynomial

# 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.