From: <js...@us...> - 2008-06-05 11:57:33
|
Revision: 5393 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5393&view=rev Author: jswhit Date: 2008-06-05 04:57:31 -0700 (Thu, 05 Jun 2008) Log Message: ----------- adjust for new num2date defaults. Modified Paths: -------------- trunk/toolkits/basemap/examples/fcstmaps.py trunk/toolkits/basemap/examples/pnganim.py Modified: trunk/toolkits/basemap/examples/fcstmaps.py =================================================================== --- trunk/toolkits/basemap/examples/fcstmaps.py 2008-06-05 01:18:55 UTC (rev 5392) +++ trunk/toolkits/basemap/examples/fcstmaps.py 2008-06-05 11:57:31 UTC (rev 5393) @@ -37,7 +37,7 @@ times = fcsttimes[0:6] # first 6 forecast times. ntimes = len(times) # convert times for datetime instances. -fdates = num2date(times,fcsttimes.units) +fdates = num2date(times,units=fcsttimes.units,calendar='standard') # make a list of YYYYMMDDHH strings. verifdates = [fdate.strftime('%Y%m%d%H') for fdate in fdates] # convert times to forecast hours. Modified: trunk/toolkits/basemap/examples/pnganim.py =================================================================== --- trunk/toolkits/basemap/examples/pnganim.py 2008-06-05 01:18:55 UTC (rev 5392) +++ trunk/toolkits/basemap/examples/pnganim.py 2008-06-05 11:57:31 UTC (rev 5393) @@ -42,7 +42,7 @@ longitudes = data.variables['lon'][:].tolist() times = data.variables['time'] # convert numeric time values to datetime objects. -fdates = num2date(times[:],times.units) +fdates = num2date(times[:],units=times.units,calendar='standard') # put times in YYYYMMDDHH format. dates = [fdate.strftime('%Y%m%d%H') for fdate in fdates] if YYYYMMDDHH1 not in dates or YYYYMMDDHH2 not in dates: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |