I ve a problem with the use of griddata.
I have a grid of x,y with value z. the grid have 4500 points
I would like to have a rigular grid of 1500 points.
I try the function zi = griddata(x,y,z,xi,yi)
but I have an error "too many indices". I don't understant why!!!
x,y,z,xi and yi are numpy array with 1 column.
Sorry for my bad english!!

Thanks

Josh Lawrence-2 wrote:
> 
> Greetings all,
> 
> In using the function griddata in mlab.py, I think I have found a bug.  
> The following line in mlab.py errors for me.
> I supply it an xi and yi that have shape (N,1). I have surface data,  
> but I only care about the variation in one direction. In mlab, when it  
> gets to this line (2956 in svn revision 7040):
> 
>           if min(xo[1:]-xo[0:-1]) < 0 or min(yo[1:]-yo[0:-1]) < 0:
>               raise ValueError, 'output grid defined by xi,yi must be  
> monotone increasing'
> 
> the result is an error. That is, I get the following:
> 
>           ValueError: min() arg is an empty sequence
> 
> A couple of things. First, if I make my variation in x to be 2 points  
> (x = 0 for the case I'm interested in--so I just have both values of x  
> be zero), I do not get this error and I believe the result works. So,  
> it seems that there should be some handling of the case that there are  
> only 1 point in either x or y direction.
> 
> Second, is it better to use the builtin python function min, or should  
> numpy.min be used instead?
> 
> Cheers,
> 
> Josh Lawrence
> Ph.D. Student
> Clemson University
> 
> 
> ------------------------------------------------------------------------------
> Stay on top of everything new and different, both inside and 
> around Java (TM) technology - register by April 22, and save
> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
> 300 plus technical and hands-on sessions. Register today. 
> Use priority code J9JMT32. http://p.sf.net/sfu/p
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Griddata-tp23083610p23929245.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to