1. Jinkyu Yi
  2. pypy

Commits

mattip  committed 6cf873d

add global constants

  • Participants
  • Parent commits e86621c
  • Branches python-numpy

Comments (0)

Files changed (2)

File lib_pypy/numpypy/__init__.py

View file
 
 sys.modules['numerictypes'] = numerictypes
 sys.modules['numpy.core.numerictypes'] = numerictypes
+
+umath.ERR_IGNORE = 0
+umath.ERR_WARN  = 1
+umath.ERR_RAISE = 2
+umath.ERR_CALL  = 3
+umath.ERR_PRINT = 4
+umath.ERR_LOG   = 5
+
+umath.UFUNC_SHIFT_DIVIDEBYZERO = 0
+umath.UFUNC_SHIFT_OVERFLOW   = 3
+umath.UFUNC_SHIFT_UNDERFLOW  = 6
+umath.UFUNC_SHIFT_INVALID    = 9
+
+umath.UFUNC_BUFSIZE_DEFAULT = 8192
+umath.ERR_DEFAULT2 = \
+        (umath.ERR_WARN << umath.UFUNC_SHIFT_DIVIDEBYZERO) +  \
+        (umath.ERR_WARN << umath.UFUNC_SHIFT_OVERFLOW) +      \
+        (umath.ERR_WARN << umath.UFUNC_SHIFT_INVALID)
+
+_errobj = [10000, 0, None]
+def _seterrobj(*args):
+    _errobj = args
+
+umath.seterrobj = _seterrobj
+
+umath.PINF = float('inf')
+umath.NAN = float('nan')

File lib_pypy/numpypy/numerictypes.py

View file
 def sctype2char(sctype):
     raise ValueError('not implemented yet')
 
+complex_ = None