diff options
author | cookedm <cookedm@localhost> | 2006-07-06 16:57:20 +0000 |
---|---|---|
committer | cookedm <cookedm@localhost> | 2006-07-06 16:57:20 +0000 |
commit | 6782a92fd1a7625ee48f6b2946a7d7149ab28a77 (patch) | |
tree | 177a92f0673655b58b247e663477af06ac1192b6 /numpy/numarray/util.py | |
parent | 216f071ab060a6f08c22666aea33f7095f079d1e (diff) | |
download | numpy-6782a92fd1a7625ee48f6b2946a7d7149ab28a77.tar.gz |
Branch numpy.distutils to distutils-revamp
Diffstat (limited to 'numpy/numarray/util.py')
-rw-r--r-- | numpy/numarray/util.py | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/numpy/numarray/util.py b/numpy/numarray/util.py deleted file mode 100644 index 1120a4005..000000000 --- a/numpy/numarray/util.py +++ /dev/null @@ -1,39 +0,0 @@ - -from numpy import geterr - -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 = geterr() - if errorStatus & FPE_INVALID: - if modes['invalid'] == "warn": - print "Warning: Encountered invalid numeric result(s)", sourcemsg - if modes['invalid'] == "raise": - raise MathDomainError(sourcemsg) - if errorStatus & FPE_DIVIDEBYZERO: - if modes['dividebyzero'] == "warn": - print "Warning: Encountered divide by zero(s)", sourcemsg - if modes['dividebyzero'] == "raise": - raise ZeroDivisionError(sourcemsg) - if errorStatus & FPE_OVERFLOW: - if modes['overflow'] == "warn": - print "Warning: Encountered overflow(s)", sourcemsg - if modes['overflow'] == "raise": - raise NumOverflowError(sourcemsg) - if errorStatus & FPE_UNDERFLOW: - if modes['underflow'] == "warn": - print "Warning: Encountered underflow(s)", sourcemsg - if modes['underflow'] == "raise": - raise UnderflowError(sourcemsg) - - -import os -import numpy -def get_numarray_include_dirs(): - base = os.path.dirname(numpy.__file__) - newdirs = [os.path.join(base, 'numarray')] - return newdirs - |