diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-04-18 18:08:56 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-04-18 18:08:56 +0000 |
commit | e273a1abc85f55719a1f3ff247372be6274522b1 (patch) | |
tree | 03a35ceedbccc8ce20f5e07f2b05513ed5614929 /numpy | |
parent | ae43872a80811507385bb4175a550d5d40d6eece (diff) | |
download | numpy-e273a1abc85f55719a1f3ff247372be6274522b1.tar.gz |
Change ...errlist to ...errobj
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/numeric.py | 20 | ||||
-rw-r--r-- | numpy/core/src/umathmodule.c.src | 4 |
2 files changed, 12 insertions, 12 deletions
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py index ad19f5b99..f3236cdb1 100644 --- a/numpy/core/numeric.py +++ b/numpy/core/numeric.py @@ -413,14 +413,14 @@ def seterr(divide="ignore", over="ignore", under="ignore", (_errdict[under] << SHIFT_UNDERFLOW) + (_errdict[invalid] << SHIFT_INVALID)) - pyvals = umath.geterrlist() + pyvals = umath.geterrobj() old = pyvals[:] pyvals[1] = maskvalue - umath.seterrlist(pyvals) + umath.seterrobj(pyvals) return old def geterr(): - maskvalue = umath.geterrlist()[1] + maskvalue = umath.geterrobj()[1] mask = 3 res = {} val = (maskvalue >> SHIFT_DIVIDEBYZERO) & mask @@ -437,30 +437,30 @@ def setbufsize(size): if size > 10e6: raise ValueError, "Very big buffers.. %s" % size - pyvals = umath.geterrlist() + pyvals = umath.geterrobj() old = pyvals[:] pyvals[0] = size - umath.seterrlist(pyvals) + umath.seterrobj(pyvals) return old def getbufsize(): - return umath.geterrlist()[0] + return umath.geterrobj()[0] def seterrcall(func): if not callable(func): raise ValueError, "Only callable can be used as callback" - pyvals = umath.geterrlist() + pyvals = umath.geterrobj() old = pyvals[:] pyvals[2] = func - umath.seterrlist(pyvals) + umath.seterrobj(pyvals) return old def geterrcall(): - return umath.geterrlist()[2] + return umath.geterrobj()[2] def _setdef(): defval = [UFUNC_BUFSIZE_DEFAULT, ERR_DEFAULT, None] - umath.seterrlist(defval) + umath.seterrobj(defval) # set the default values _setdef() diff --git a/numpy/core/src/umathmodule.c.src b/numpy/core/src/umathmodule.c.src index 461671818..5b0f44c44 100644 --- a/numpy/core/src/umathmodule.c.src +++ b/numpy/core/src/umathmodule.c.src @@ -2262,9 +2262,9 @@ InitOtherOperators(PyObject *dictionary) { static struct PyMethodDef methods[] = { {"frompyfunc", (PyCFunction) ufunc_frompyfunc, METH_VARARGS | METH_KEYWORDS, doc_frompyfunc}, - {"seterrlist", (PyCFunction) ufunc_seterr, + {"seterrobj", (PyCFunction) ufunc_seterr, METH_VARARGS, NULL}, - {"geterrlist", (PyCFunction) ufunc_geterr, + {"geterrobj", (PyCFunction) ufunc_geterr, METH_VARARGS, NULL}, {NULL, NULL, 0} /* sentinel */ }; |