summaryrefslogtreecommitdiff
path: root/numpy/numarray/util.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2010-02-21 03:34:02 +0000
committerCharles Harris <charlesr.harris@gmail.com>2010-02-21 03:34:02 +0000
commitbc01dee3df3a46e9c032ee55749f3aa5343a9531 (patch)
treed8ba59fff3c7265dd5674d67dcc292cb94b8d14b /numpy/numarray/util.py
parentb913aa5155f427bc34eef5327d596981ebeba7f6 (diff)
downloadnumpy-bc01dee3df3a46e9c032ee55749f3aa5343a9531.tar.gz
STY: Use import numpy as np. This seems to fix an import error introduced by
2to3, but that may have been an artifact from a previous build. In anycase, no harm done.
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