Revision: 5959
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5959&view=rev
Author:   jswhit
Date:     2008-08-04 11:44:30 +0000 (Mon, 04 Aug 2008)

Log Message:
-----------
only run meshgrid on lons,lats in rotate_vector if it really
makes sense to do so.

Modified Paths:
--------------
    trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py

Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2008-08-03 
18:02:34 UTC (rev 5958)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2008-08-04 
11:44:30 UTC (rev 5959)
@@ -2415,7 +2415,13 @@
         returns ``uout,vout,x,y`` (where ``x,y`` are the map projection
         coordinates of the grid defined by ``lons,lats``).
         """
-        if lons.ndim == 1 and lats.ndim == 1:
+        # if lons,lats are 1d and uin,vin are 2d, and
+        # lats describes 1st dim of uin,vin, and
+        # lons describes 2nd dim of uin,vin, make lons,lats 2d
+        # with meshgrid.
+        if lons.ndim == lats.ndim == 1 and uin.ndim == vin.ndim == 2 and\
+           uin.shape[1] == vin.shape[1] == lons.shape[0] and\
+           uin.shape[0] == vin.shape[0] == lats.shape[0]:
             lons, lats = np.meshgrid(lons, lats) 
         x, y = self(lons, lats)
         # rotate from geographic to map coordinates.


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-checkins mailing list
Matplotlib-checkins@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to