[Numpy-svn] r8231 - trunk/numpy/numarray

numpy-svn@scip... numpy-svn@scip...
Sat Feb 20 21:34:02 CST 2010


Author: charris
Date: 2010-02-20 21:34:02 -0600 (Sat, 20 Feb 2010)
New Revision: 8231

Modified:
   trunk/numpy/numarray/util.py
Log:
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.

Modified: trunk/numpy/numarray/util.py
===================================================================
--- trunk/numpy/numarray/util.py	2010-02-21 03:25:33 UTC (rev 8230)
+++ trunk/numpy/numarray/util.py	2010-02-21 03:34:02 UTC (rev 8231)
@@ -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



More information about the Numpy-svn mailing list