Commits

Brian Kearns  committed 070c498

define this at app-level like numpy

  • Participants
  • Parent commits ee3db3d

Comments (0)

Files changed (3)

File lib_pypy/numpypy/core/numeric.py

 __all__ = [
+           'ufunc',
            'asanyarray', 'base_repr',
            'array_repr', 'array_str', 'set_string_function',
            'array_equal', 'asarray', 'outer', 'identity', 'little_endian',
           ]
 
 from _numpypy import array, ndarray, int_, float_, bool_, flexible #, complex_# , longlong
-from _numpypy import concatenate
+from _numpypy import concatenate, sin
 from .fromnumeric import any
 import sys
 import multiarray
 from umath import *
 from numpypy.core.arrayprint import array2string
 
+ufunc = type(sin)
+
 def extend_all(module):
     adict = {}
     for a in __all__:

File pypy/module/micronumpy/__init__.py

     interpleveldefs = {
         'ndarray': 'interp_numarray.W_NDimArray',
         'dtype': 'interp_dtype.W_Dtype',
-        'ufunc': 'interp_ufuncs.W_Ufunc',
 
         'array': 'interp_numarray.array',
         'zeros': 'interp_numarray.zeros',

File pypy/module/micronumpy/test/test_ufuncs.py

         cls.w_isWindows = cls.space.wrap(os.name == 'nt')
 
     def test_ufunc_instance(self):
-        from _numpypy import add, ufunc
+        from numpypy import add, ufunc
 
         assert isinstance(add, ufunc)
         assert repr(add) == "<ufunc 'add'>"