[pypy-commit] pypy python-numpy: pass a few tests
mattip
noreply at buildbot.pypy.org
Sun Oct 21 22:52:53 CEST 2012
Author: Matti Picus <matti.picus at gmail.com>
Branch: python-numpy
Changeset: r58329:af767d686834
Date: 2012-10-21 22:51 +0200
http://bitbucket.org/pypy/pypy/changeset/af767d686834/
Log: pass a few tests
diff --git a/lib_pypy/numpypy/__init__.py b/lib_pypy/numpypy/__init__.py
--- a/lib_pypy/numpypy/__init__.py
+++ b/lib_pypy/numpypy/__init__.py
@@ -33,22 +33,27 @@
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.SHIFT_DIVIDEBYZERO = 0
+umath.SHIFT_OVERFLOW = 3
+umath.SHIFT_UNDERFLOW = 6
+umath.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)
+ (umath.ERR_WARN << umath.SHIFT_DIVIDEBYZERO) + \
+ (umath.ERR_WARN << umath.SHIFT_OVERFLOW) + \
+ (umath.ERR_WARN << umath.SHIFT_INVALID)
_errobj = [10000, 0, None]
-def _seterrobj(*args):
+def _seterrobj(args):
+ global _errobj
_errobj = args
+def _geterrobj():
+ return _errobj
+
umath.seterrobj = _seterrobj
+umath.geterrobj = _geterrobj
umath.PINF = float('inf')
umath.NAN = float('nan')
@@ -57,6 +62,7 @@
def not_implemented_func(*args, **kwargs):
raise NotImplementedError("implemented yet")
+
setattr(_numpypy, 'frompyfunc', not_implemented_func)
setattr(_numpypy, 'mod', not_implemented_func)
setattr(_numpypy, 'conjugate', not_implemented_func)
More information about the pypy-commit
mailing list