Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

correct doc for pchip interpolation #3239

Merged
merged 1 commit into from

3 participants

Benny Coveralls Pauli Virtanen
Benny

Doc update.
pchip_interpolate had comments as normal polynomial interpolate with derivatives given, but pchip does not allow derivatives to be passed, they are computed by the pchip algorithm

Coveralls

Coverage Status

Coverage remained the same when pulling f32c289 on bmcage:monohermspline into 7af62c8 on scipy:master.

Pauli Virtanen pv merged commit 0c98f25 into from
Pauli Virtanen
Owner
pv commented

Thanks, merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 24, 2014
  1. Benny
This page is out of date. Refresh to see the latest.
Showing with 11 additions and 5 deletions.
  1. +11 −5 scipy/interpolate/polyint.py
16 scipy/interpolate/polyint.py
View
@@ -909,9 +909,10 @@ class PchipInterpolator(PiecewisePolynomial):
include duplicate values (otherwise f is overspecified)
y : ndarray
A 1-D array of real values. `y`'s length along the interpolation
- axis must be equal to the length of `x`.
+ axis must be equal to the length of `x`. If N-D array, use axis
+ parameter to select correct axis.
axis : int, optional
- Axis in the yi array corresponding to the x-coordinate values.
+ Axis in the y array corresponding to the x-coordinate values.
Notes
-----
@@ -989,7 +990,10 @@ def _find_derivatives(x, y):
def pchip_interpolate(xi, yi, x, der=0, axis=0):
"""
- Convenience function for pchip interpolation.
+ Convenience function for pchip interpolation.
+ xi and yi are arrays of values used to approximate some function f,
+ with ``yi = f(xi)``. The interpolant uses monotonic cubic splines
+ to find the value of new points x and the derivatives there.
See `PchipInterpolator` for details.
@@ -997,8 +1001,10 @@ def pchip_interpolate(xi, yi, x, der=0, axis=0):
----------
xi : array_like
A sorted list of x-coordinates, of length N.
- yi : list of lists
- yi[i] is the list of derivatives known at xi[i]. Of length N.
+ yi : array_like
+ A 1-D array of real values. `yi`'s length along the interpolation
+ axis must be equal to the length of `xi`. If N-D array, use axis
+ parameter to select correct axis.
x : scalar or array_like
Of length M.
der : integer or list
Something went wrong with that request. Please try again.