[Numpy-svn] r3038 - trunk/numpy/core

numpy-svn at scipy.org numpy-svn at scipy.org
Fri Aug 18 14:18:19 CDT 2006


Author: oliphant
Date: 2006-08-18 14:18:18 -0500 (Fri, 18 Aug 2006)
New Revision: 3038

Modified:
   trunk/numpy/core/numerictypes.py
Log:
Fix missing bool8

Modified: trunk/numpy/core/numerictypes.py
===================================================================
--- trunk/numpy/core/numerictypes.py	2006-08-18 19:09:11 UTC (rev 3037)
+++ trunk/numpy/core/numerictypes.py	2006-08-18 19:18:18 UTC (rev 3038)
@@ -110,7 +110,11 @@
     base = ''
     char = ''
     try:
-        info = typeinfo[name.upper()]
+        if name[-1] == '_':
+            newname = name[:-1]
+        else:
+            newname = name
+        info = typeinfo[newname.upper()]
         assert(info[-1] == obj)  # sanity check
         bits = info[2]
 
@@ -118,19 +122,19 @@
         base, bits = _evalname(name)
         char = base[0]
 
-    if name == 'bool':
+    if name == 'bool_':
         char = 'b'
         base = 'bool'
-    elif name=='string':
+    elif name=='string_':
         char = 'S'
         base = 'string'
-    elif name=='unicode':
+    elif name=='unicode_':
         char = 'U'
         base = 'unicode'
     elif name=='void':
         char = 'V'
         base = 'void'
-    elif name=='object':
+    elif name=='object_':
         char = 'O'
         base = 'object'
         bits = 0



More information about the Numpy-svn mailing list