import scipy.interpolate
y_interp = scipy.interpolate.interp1d(x, y)
print y_interp(5.0)
scipy.interpolate.interp1d
does linear interpolation by and can be customized to handle error conditions.
More Related Contents:
- Inverse Distance Weighted (IDW) Interpolation with Python
- Interpolate NaN values in a numpy array
- How can I perform two-dimensional interpolation using scipy?
- Pandas interpolate within a groupby
- Multivariate spline interpolation in python/scipy?
- Interpolation over an irregular grid
- Python/Scipy 2D Interpolation (Non-uniform Data)
- How to perform bilinear interpolation in Python
- Resample time series in pandas to a weekly interval
- Fast interpolation of grid data
- Python 4D linear interpolation on a rectangular grid
- Interpolating a closed curve using scipy
- scipy interp2d/bisplrep unexpected output when given 1D input
- Calculate RGB value for a range of values to create heat map
- Speedup scipy griddata for multiple interpolations between two irregular grids
- How to identify and label similar rows in a pandas data frame
- Why does python use ‘else’ after for and while loops?
- How can I recover the return value of a function passed to multiprocessing.Process?
- How can I display full (non-truncated) dataframe information in HTML when converting from Pandas dataframe to HTML?
- How to update the image of a Tkinter Label widget?
- Created multiple instances of the same image using a loop, can I move each instance of the image independently?
- Getting values from object oriented tkinter [duplicate]
- List of all available matplotlib backends
- How to convert a grayscale image into a list of pixel values?
- Putting arrowheads on vectors in matplotlib’s 3d plot
- How to create equal-width grid columns with Tkinter?
- Convert timestamp since epoch to datetime.datetime
- FutureWarning: The default value of regex will change from True to False in a future version
- Python’s “open()” throws different errors for “file not found” – how to handle both exceptions?
- django excel xlwt