1. Pypy
  2. Untitled project
  3. pypy

Commits

Matti Picus  committed 9a5c26a

export demi-module names in numpy.core by modifying numpy.core.__all__

  • Participants
  • Parent commits ebe070e
  • Branches python-numpy

Comments (0)

Files changed (1)

File lib_pypy/numpypy/__init__.py

View file
  • Ignore whitespace
-#from _numpypy import *
-#from .core import *
+
 
 import sys
 import math as _math
 umath = _numpypy
 
 import multiarray
+sys.modules['multiarray'] = multiarray
 sys.modules['numpy.core.multiarray'] = multiarray
+sys.modules['umath'] = umath
 sys.modules['numpy.core.umath'] = _numpypy
 
 import numerictypes
 sys.modules['scalarmath'] = scalarmath
 sys.modules['numpy.core.scalarmath'] = scalarmath
 
+import _compiled_base
+sys.modules['_compiled_base'] = _compiled_base
+sys.modules['numpy.lib._compiled_base'] = _compiled_base
+
+
 umath.ERR_IGNORE = 0
 umath.ERR_WARN  = 1
 umath.ERR_RAISE = 2
 umath.NAN = float('nan')
 umath.pi = _math.pi
 
+#mangle the __all__ of numpy.core so that import numpy.core.numerictypes works
+from numpy import core
+core.__all__ += ['multiarray', 'numerictypes', 'umath']
+core.numerictypes = numerictypes
+
 del _math
 
 def not_implemented_func(*args, **kwargs):
 
 setattr(_numpypy, 'frompyfunc', not_implemented_func)
 setattr(_numpypy, 'mod', not_implemented_func)
+
+core.complexfloating = None