On Thu, Feb 25, 2010 at 7:26 PM, Friedrich Romstedt
<friedrichromst...@gmail.com> wrote:
> 2010/2/25 Andrew Charles <ac1...@gmail.com>:
>> I'm trying to interpolate from one grid to another using Basemap's
>> interp function. It seems to want the lat and lon axis of the new grid
>> to have the same shape:
>>
>> 3524  if xout.shape != yout.shape:
>> 3535     raise ValueError, 'xout and yout must have same shape!'
>>
>> The grid I'm interpolating to is 144 by 72
>>
>> I'm calling it as interp(x,lon,lat,plon,plat)
>> where lon and plon are numpy arrays with shape (144,) lat has shape
>> (73,) plat has shape(72,) and x has shape (72, 144)
>>
>> Does interp() really only work if the target grid is square?
>
> I guess it wants a meshgrid

Aye, now that I read the docstring with a rested pair of eyes it's
clear that xout and yout are meshgrids (rank 2 arrays). Thanks,
problem solved.

-------------------------
Andrew Charles

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to