[SciPy-user] equivalent to Matlab's interp1

Pauli Virtanen pav at iki.fi
Mon Jun 15 13:47:58 EDT 2009


On 2009-06-15, Nils Wagner <nwagner at 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