Hi- I was working off of the example listed at http://matplotlib.sourceforge.net/examples/pylab_examples/griddata_demo.html, adapting it to my own data, and encountered the following error on MLAB 1.1.0, Python 2.7.2: <code>
from numpy.random import uniform, seed from matplotlib.mlab import griddata import matplotlib.pyplot as plt import numpy as np # make up data. #npts = int(raw_input('enter # of random points to plot:')) seed(0) npts = 200 x = uniform(-2,2,npts) y = uniform(-2,2,npts) z = x*np.exp(-x**2-y**2) xi = np.linspace(0,60,100) # <= my xdata range yi = np.linspace(0,0.9,200) # <= my ydata range zi = griddata(x,y,z,xi,yi,interp='linear') </code> which produces --------------------------------------------------------------------------- ValueError Traceback (most recent call last) C:\Users\Ethan\code\PythonScripts\<ipython-input-7-51e10e494403> in <module>() ----> 1 zi = griddata(x,y,z,xi,yi,interp='linear') It seems that 'xi,yi = np.meshgrid(xi,yi)' from line 2766 of mlab.py doesn't always produce uniformly spaced data, as the test for uniform data fails at line 2779. Ignoring the error, however, results in satisfactory evaluation of interp() on 2783. Can anyone else reproduce? Regards, Ethan ------------------------------------------------------------------------------ Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users