1. Pypy
  2. Untitled project
  3. pypy

Commits

mattip  committed d30cbc4

fake missing dtypes

  • Participants
  • Parent commits db399f9
  • Branches python-numpy

Comments (0)

Files changed (1)

File lib_pypy/numpypy/numerictypes.py

View file
     for alias, t in type_pairs:
         try:
             allTypes[alias] = allTypes[t]
-            sctypeDict[alias] = sctypeDict[t]
         except KeyError:
-            print 'dtype',t,'not implemented in numpypy, will be missing in numerictypes.sctypeDict'
+            print 'dtype',t,"not implemented in numpypy, using dtype('void') instead"
+            allTypes[t] = allTypes['void']
+            allTypes[alias] = allTypes[t]
+        sctypeDict[alias] = sctypeDict['void']
     # Remove aliases overriding python types and modules
     to_remove = ['ulong', 'object', 'unicode', 'int', 'long', 'float',
                  'complex', 'bool', 'string', 'datetime', 'timedelta']
     if isinstance(name, tuple):
         sctypeDict[name[0]] = name[1]
     else:
-        try:
-            sctypeDict[name] = allTypes['%s_' % name]
-        except:
-            print 'dtype',name,'not implemented, not assigned in numerictypes.sctypeDict'
+        sctypeDict[name] = allTypes['%s_' % name]
 
 del _toadd, name
 
 
 del key
 
+complex_ = dtype('void')
+
 typecodes = {'Character':'c',
              'Integer':'bhilqp',
              'UnsignedInteger':'BHILQP',