[SciPy-user] Interpolation
Tim Gray
tgray at princeton.edu
Thu Apr 21 20:14:56 EDT 2005
Hi, I've got a question for everyone. I'm trying to some code from IDL that uses the interpolate function. Basically I've got a big 2d array of data with time as one index and radius on the other index. Each value in the array is "data". I basically need to interpolate this data to other radii.
Here's what IDL's interpolate does (to 2d arrays). It takes an array such as:
x =[[ 0, 1, 2, 3,]
[ 4, 5, 6, 7,]
[ 8, 9,10,11,]
[12,13,14,15,]]
and given two vectors which define the desired indices to interpolate the data to, it spits out a new array. So for an input of:
interpolate(x,[.5,1.5,2.5],[.5,1.5,2.5]), you get a 3x3 array of:
[[ 2.5, 3, 4.5]
[ 6.5, 7.5, 8.5]
[10.5, 11.5, 12.5]]
I'm sure something like this is in Scipy already, I'm just having problems finding it. Any suggestions?
Tim
More information about the SciPy-User
mailing list