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

numpy-svn@scip... numpy-svn@scip...
Mon Feb 22 09:28:38 CST 2010


Author: chanley
Date: 2010-02-22 09:28:38 -0600 (Mon, 22 Feb 2010)
New Revision: 8252

Modified:
   trunk/numpy/numarray/util.py
Log:
Fix bad usage of namespace alias change

Modified: trunk/numpy/numarray/util.py
===================================================================
--- trunk/numpy/numarray/util.py	2010-02-21 23:17:54 UTC (rev 8251)
+++ trunk/numpy/numarray/util.py	2010-02-22 15:28:38 UTC (rev 8252)
@@ -19,22 +19,22 @@
 def handleError(errorStatus, sourcemsg):
     """Take error status and use error mode to handle it."""
     modes = np.geterr()
-    if errorStatus & numpy.FPE_INVALID:
+    if errorStatus & np.FPE_INVALID:
         if modes['invalid'] == "warn":
             print "Warning: Encountered invalid numeric result(s)", sourcemsg
         if modes['invalid'] == "raise":
             raise MathDomainError(sourcemsg)
-    if errorStatus & numpy.FPE_DIVIDEBYZERO:
+    if errorStatus & np.FPE_DIVIDEBYZERO:
         if modes['dividebyzero'] == "warn":
             print "Warning: Encountered divide by zero(s)", sourcemsg
         if modes['dividebyzero'] == "raise":
             raise ZeroDivisionError(sourcemsg)
-    if errorStatus & numpy.FPE_OVERFLOW:
+    if errorStatus & np.FPE_OVERFLOW:
         if modes['overflow'] == "warn":
             print "Warning: Encountered overflow(s)", sourcemsg
         if modes['overflow'] == "raise":
             raise NumOverflowError(sourcemsg)
-    if errorStatus & numpy.FPE_UNDERFLOW:
+    if errorStatus & np.FPE_UNDERFLOW:
         if modes['underflow'] == "warn":
             print "Warning: Encountered underflow(s)", sourcemsg
         if modes['underflow'] == "raise":
@@ -42,6 +42,6 @@
 
 
 def get_numarray_include_dirs():
-    base = os.path.dirname(numpy.__file__)
+    base = os.path.dirname(np.__file__)
     newdirs = [os.path.join(base, 'numarray', 'include')]
     return newdirs



More information about the Numpy-svn mailing list