[SciPy-user] equivalent to Matlab's interp1

Pauli Virtanen pav@iki...
Mon Jun 15 12:47:58 CDT 2009


On 2009-06-15, Nils Wagner <nwagner@iam.uni-stuttgart.de> wrote:
> Hi all,
>
> Is there an equivalent function to Matlab's 
> interp1(x,y,x_new) in scipy.interpolate ?

Yes.

>>> scipy.interpolate.interp1d([1,2,3],[4,5,6])([1.5, 2.5])
array([ 4.5,  5.5])


-- 
Pauli Virtanen



More information about the SciPy-user mailing list