[Scipy-svn] r2598 - trunk/Lib/sandbox/timeseries

scipy-svn at scipy.org scipy-svn at scipy.org
Tue Jan 23 15:28:11 EST 2007


Author: mattknox_ca
Date: 2007-01-23 14:28:08 -0600 (Tue, 23 Jan 2007)
New Revision: 2598

Modified:
   trunk/Lib/sandbox/timeseries/tcore.py
Log:
added None as a synonym for "UNDEFINED" observed setting

Modified: trunk/Lib/sandbox/timeseries/tcore.py
===================================================================
--- trunk/Lib/sandbox/timeseries/tcore.py	2007-01-23 20:15:49 UTC (rev 2597)
+++ trunk/Lib/sandbox/timeseries/tcore.py	2007-01-23 20:28:08 UTC (rev 2598)
@@ -42,7 +42,7 @@
 #####---------------------------------------------------------------------------
 #---- --- Option conversion ---
 #####---------------------------------------------------------------------------
-fmtobs_dict = {'UNDEFINED': ['UNDEF','UNDEFINED'],
+fmtobs_dict = {'UNDEFINED': ['UNDEF','UNDEFINED',None],
                'BEGINNING': ['BEGIN','BEGINNING'],
                'ENDING': ['END','ENDING'],
                'AVERAGED': ['AVERAGE','AVERAGE','MEAN'],
@@ -50,7 +50,8 @@
                'MAXIMUM': ['MAX','MAXIMUM','HIGH'],
                'MINIMUM': ['MIN','MINIMUM','LOW']}
 
-obs_dict = {"UNDEFINED":None,
+obs_dict = {None:None,
+            "UNDEFINED":None,
             "UNDEF":None,
             "BEGIN": first_unmasked_val,
             "BEGINNING": first_unmasked_val,
@@ -73,7 +74,7 @@
 def fmtObserv(obStr):
     "Converts a possible 'Observed' string into acceptable values."
     if obStr is None:
-        return None
+        return fmtobs_revdict[None]
     elif obStr.upper() in fmtobs_revdict:
         return fmtobs_revdict[obStr.upper()]
     else:




More information about the Scipy-svn mailing list