summaryrefslogtreecommitdiff
path: root/numpy/numarray/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/numarray/util.py')
-rw-r--r--numpy/numarray/util.py18
1 files changed, 13 insertions, 5 deletions
diff --git a/numpy/numarray/util.py b/numpy/numarray/util.py
index 64a3f1711..9b4ffd619 100644
--- a/numpy/numarray/util.py
+++ b/numpy/numarray/util.py
@@ -1,16 +1,24 @@
import os
-import numpy
+import numpy as np
__all__ = ['MathDomainError', 'UnderflowError', 'NumOverflowError',
'handleError', 'get_numarray_include_dirs']
-class MathDomainError(ArithmeticError): pass
-class UnderflowError(ArithmeticError): pass
-class NumOverflowError(OverflowError, ArithmeticError): pass
+class MathDomainError(ArithmeticError):
+ pass
+
+
+class UnderflowError(ArithmeticError):
+ pass
+
+
+class NumOverflowError(OverflowError, ArithmeticError):
+ pass
+
def handleError(errorStatus, sourcemsg):
"""Take error status and use error mode to handle it."""
- modes = numpy.geterr()
+ modes = np.geterr()
if errorStatus & numpy.FPE_INVALID:
if modes['invalid'] == "warn":
print "Warning: Encountered invalid numeric result(s)", sourcemsg