summaryrefslogtreecommitdiff
path: root/numpy/core/numeric.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-10-19 17:27:55 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-10-19 17:27:55 +0000
commitc08e80eb6c1f47a9d65e363316ae1f6c6e6f870d (patch)
tree523384f97f023786d69ff9b4452460e21d881f3d /numpy/core/numeric.py
parente84754abd8efafab439474137865707d2bbbdd20 (diff)
downloadnumpy-c08e80eb6c1f47a9d65e363316ae1f6c6e6f870d.tar.gz
Eliminate more warnings in testing.
Diffstat (limited to 'numpy/core/numeric.py')
-rw-r--r--numpy/core/numeric.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py
index 0f6f02eed..c5a108e43 100644
--- a/numpy/core/numeric.py
+++ b/numpy/core/numeric.py
@@ -781,17 +781,16 @@ class errstate(object):
# Note that we don't want to run the above doctests because they will fail
# without a from __future__ import with_statement
def __init__(self, **kwargs):
- try:
- self.errcall = kwargs.pop('errcall')
- except KeyError:
- self.errcall = None
+ self.call = kwargs.pop('call',None)
self.kwargs = kwargs
def __enter__(self):
self.oldstate = seterr(**self.kwargs)
- self.oldcall = seterrcall(self.errcall)
+ if self.call:
+ self.oldcall = seterrcall(self.call)
def __exit__(self, *exc_info):
seterr(**self.oldstate)
- seterrcall(self.oldcall)
+ if self.call:
+ seterrcall(self.oldcall)
def _setdef():
defval = [UFUNC_BUFSIZE_DEFAULT, ERR_DEFAULT2, None]