title: python: sorting large datasets to use in transform_scalar function to plot data on the map
body: <p>I am trying to plot a large dataset on the map and as I understand, I need to use this function: </p>
  
  <p>m.transform_scalar(temp, lons, lats,nx,ny)</p>
  
  <p>temp is the temperature which I want to plot it on the map with lons and lats as longtitude and latitude.</p>
  
  <p>here is the code: </p>
  
  <pre><code>m = Basemap(llcrnrlon=-145.5,llcrnrlat=1.,urcrnrlon=-2.566,urcrnrlat=46.352,\
          rsphere=(6378137.00,6356752.3142),\
          resolution='l',area_thresh=1000.,projection='lcc',\
          lat_1=50.,lon_0=-107.,ax=ax)
  nx = int((m.xmax-m.xmin)/5000.)+1 
  ny = int((m.ymax-m.ymin)/5000.)+1
  temp3 = m.transform_scalar(temp, lons, lats,nx,ny)
  </code></pre>
  
  <p>this is the error: 
  if min(delon) &lt; 0. or min(delat) &lt; 0.:
  ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()</p>
  
  <p>I tried in different ways to sort lons and lats to cover this error, but it is still continue in different kinds of errors and I am so confused!!I don't know how to sort these large data-sets!!? Is there any other way to plot data on the map in the python? how I can challenge with this error?</p>