summaryrefslogtreecommitdiff
path: root/numpy/core/numeric.py
diff options
context:
space:
mode:
authorRobert Kern <robert.kern@gmail.com>2011-03-30 17:48:43 -0500
committerCharles Harris <charlesr.harris@gmail.com>2011-04-01 19:49:46 -0600
commitdc22394efedc3dafff45dd857b96398f2f56f625 (patch)
tree2187689c63ab725a5be8aa2214aa2f62ea212185 /numpy/core/numeric.py
parentef46a0910a9233b485a3b1313d2eedc217d3981b (diff)
downloadnumpy-dc22394efedc3dafff45dd857b96398f2f56f625.tar.gz
ENH: Change the default error handling to warn instead of print, except for underflow, which remains ignored.
Diffstat (limited to 'numpy/core/numeric.py')
-rw-r--r--numpy/core/numeric.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py
index 74b8ba8a4..e36f196c1 100644
--- a/numpy/core/numeric.py
+++ b/numpy/core/numeric.py
@@ -2141,8 +2141,8 @@ def geterr():
Examples
--------
- >>> np.geterr() # default is all set to 'ignore'
- {'over': 'ignore', 'divide': 'ignore', 'invalid': 'ignore',
+ >>> np.geterr()
+ {'over': 'warn', 'divide': 'warn', 'invalid': 'warn',
'under': 'ignore'}
>>> np.arange(3.) / np.arange(3.)
array([ NaN, 1., 1.])
@@ -2390,7 +2390,7 @@ class errstate(object):
Outside the context the error handling behavior has not changed:
>>> np.geterr()
- {'over': 'ignore', 'divide': 'ignore', 'invalid': 'ignore',
+ {'over': 'warn', 'divide': 'warn', 'invalid': 'warn',
'under': 'ignore'}
"""