diff options
author | chanley <chanley@gmail.com> | 2010-02-22 15:28:38 +0000 |
---|---|---|
committer | chanley <chanley@gmail.com> | 2010-02-22 15:28:38 +0000 |
commit | a2dc78f54f65fa67d6d02e9fcc563752efd67509 (patch) | |
tree | 8ff041a43c76224cbb1b374efee1fe7650c7d6a5 /numpy/numarray/util.py | |
parent | 89147a16a8f57bf7650cd50872f46c64c528af60 (diff) | |
download | numpy-a2dc78f54f65fa67d6d02e9fcc563752efd67509.tar.gz |
Fix bad usage of namespace alias change
Diffstat (limited to 'numpy/numarray/util.py')
-rw-r--r-- | numpy/numarray/util.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/numpy/numarray/util.py b/numpy/numarray/util.py index 9b4ffd619..9555474a8 100644 --- a/numpy/numarray/util.py +++ b/numpy/numarray/util.py @@ -19,22 +19,22 @@ class NumOverflowError(OverflowError, ArithmeticError): 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 handleError(errorStatus, sourcemsg): 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 |