python - scipy PchipInterpolator implementation problems -
i trying implement pchipinterpolator based on link:
http://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.interpolate.pchipinterpolator.html
the code using is:
x = np.arange(0, 10) y = np.exp(-x/3.0) set_interp = scipy.interpolate.pchipinterpolator( x, y, extrapolate=true )
i error as:
typeerror: __init__() got unexpected keyword argument 'extrapolate'
so, implementing wrong way. have tried numerous other ways implement extrapolate fails.
pchipinterpolator
refactored in version 0.14, , that's when has grown extrapolate
keyword.
compare docs version 0.13: http://docs.scipy.org/doc/scipy-0.13.0/reference/generated/scipy.interpolate.pchipinterpolator.html
and version 0.14: http://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.interpolate.pchipinterpolator.html
(disclaimer: involved in refactor)
scipy 0.13 quite old now, best consider upgrading.
more recent scipy versions better in terms of consistency in interpolate
. one, polynomial-based interpolators (ppoly, bpoly, pchip , akima) have extrapolate
keyword.
Comments
Post a Comment