[Numpy-svn] r8099 - branches/1.4.x/numpy/core

numpy-svn@scip... numpy-svn@scip...
Tue Feb 9 00:11:33 CST 2010


Author: cdavid
Date: 2010-02-09 00:11:33 -0600 (Tue, 09 Feb 2010)
New Revision: 8099

Modified:
   branches/1.4.x/numpy/core/arrayprint.py
   branches/1.4.x/numpy/core/numerictypes.py
Log:
REF: remove datetime support at python level.

Modified: branches/1.4.x/numpy/core/arrayprint.py
===================================================================
--- branches/1.4.x/numpy/core/arrayprint.py	2010-02-09 06:11:19 UTC (rev 8098)
+++ branches/1.4.x/numpy/core/arrayprint.py	2010-02-09 06:11:33 UTC (rev 8099)
@@ -191,13 +191,10 @@
             # make sure True and False line up.
             format_function = _boolFormatter
         elif issubclass(dtypeobj, _nt.integer):
-            if issubclass(dtypeobj, _nt.timeinteger):
-                format_function = str
-            else:
-                max_str_len = max(len(str(maximum.reduce(data))),
-                                  len(str(minimum.reduce(data))))
-                format = '%' + str(max_str_len) + 'd'
-                format_function = lambda x: _formatInteger(x, format)
+            max_str_len = max(len(str(maximum.reduce(data))),
+                              len(str(minimum.reduce(data))))
+            format = '%' + str(max_str_len) + 'd'
+            format_function = lambda x: _formatInteger(x, format)
         elif issubclass(dtypeobj, _nt.floating):
             if issubclass(dtypeobj, _nt.longfloat):
                 format_function = _longfloatFormatter(precision)

Modified: branches/1.4.x/numpy/core/numerictypes.py
===================================================================
--- branches/1.4.x/numpy/core/numerictypes.py	2010-02-09 06:11:19 UTC (rev 8098)
+++ branches/1.4.x/numpy/core/numerictypes.py	2010-02-09 06:11:33 UTC (rev 8099)
@@ -373,15 +373,13 @@
                   ('unicode_', 'unicode'),
                   ('str_', 'string'),
                   ('string_', 'string'),
-                  ('object_', 'object'),
-                  ('timedelta_', 'timedelta'),
-                  ('datetime_', 'datetime')]
+                  ('object_', 'object'),]
     for alias, t in type_pairs:
         allTypes[alias] = allTypes[t]
         sctypeDict[alias] = sctypeDict[t]
     # Remove aliases overriding python types and modules
     for t in ['ulong', 'object', 'unicode', 'int', 'long', 'float',
-              'complex', 'bool', 'string', 'datetime', 'timedelta']:
+              'complex', 'bool', 'string', 'datetime']:
         try:
             del allTypes[t]
             del sctypeDict[t]



More information about the Numpy-svn mailing list