[SciPy-user] interpolation question

Michael Hearne mhearne@usgs....
Wed Oct 17 15:46:31 CDT 2007


John - Thanks very much, this is great!

I do have one more question - when I use the code with a non-square  
grid, I get an error saying that my x data does not match the x  
dimension of my z data.

In looking at the following code, it seems like x is being compared  
with the number of rows of Z data, and y being compared with the  
number of columns:

if not x.size == z.shape[0]:
             raise TypeError,\
                   'x dimension of z must have same number of  
elements as x'
         if not y.size == z.shape[1]:
             raise TypeError,\
                   'y dimension of z must have same number of  
elements as y'

Isn't numpy row-major like Matlab?  I.e, The first dimension is that  
of rows, the second is that of columns?

Thanks,

Mike Hearne

On Oct 17, 2007, at 1:17 PM, John Travers wrote:

> from scipy.interpolate import RectBivariateSpline




------------------------------------------------------
Michael Hearne
mhearne@usgs.gov
(303) 273-8620
USGS National Earthquake Information Center
1711 Illinois St. Golden CO 80401
Senior Software Engineer
Synergetics, Inc.
------------------------------------------------------


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-user/attachments/20071017/35ebf2f7/attachment.html 


More information about the SciPy-user mailing list