Revision: 6370
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6370&view=rev
Author: jswhit
Date: 2008-11-07 12:36:37 +0000 (Fri, 07 Nov 2008)
Log Message:
-----------
Added masked array support to shiftgrid, fix cut and paste error in
previous commit. Patch provided by Jesper Larsen.
Modified Paths:
--------------
trunk/toolkits/basemap/Changelog
trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
Modified: trunk/toolkits/basemap/Changelog
===================================================================
--- trunk/toolkits/basemap/Changelog 2008-11-07 12:30:08 UTC (rev 6369)
+++ trunk/toolkits/basemap/Changelog 2008-11-07 12:36:37 UTC (rev 6370)
@@ -1,4 +1,6 @@
version 0.99.2 (not yet released)
+ * Added masked array support to shiftgrid function
+ (thanks to Jesper Larsen).
* defer import of netcdf stuff till it is needed (in NetCDFFile
function).
* Added McBryde-Thomas Flat Polar Quartic (projection =
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2008-11-07
12:30:08 UTC (rev 6369)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2008-11-07
12:36:37 UTC (rev 6370)
@@ -3680,13 +3680,13 @@
raise ValueError, 'lon0 outside of range of lonsin'
i0 = np.argmin(np.fabs(lonsin-lon0))
if hasattr(datain,'mask'):
- datout = ma.zeros((nlats,nlons+1),datain.dtype)
+ dataout = ma.zeros(datain.shape,datain.dtype)
else:
- datout = np.zeros((nlats,nlons+1),datain.dtype)
+ dataout = np.zeros(datain.shape,datain.dtype)
if hasattr(lonsin,'mask'):
- lonsout = ma.zeros(nlons+1,lonsin.dtype)
+ lonsout = ma.zeros(lonsin.shape,lonsin.dtype)
else:
- lonsout = np.zeros(nlons+1,lonsin.dtype)
+ lonsout = np.zeros(lonsin.shape,lonsin.dtype)
if start:
lonsout[0:len(lonsin)-i0] = lonsin[i0:]
else:
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins