diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2013-08-18 18:40:28 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2013-09-23 15:11:12 -0600 |
commit | 3beebbc0164afbbcc2b6840cf56174c6c073bb40 (patch) | |
tree | 5eece25d48cd246d78a94e3fcda8c565b6d78258 /numpy/numarray/util.py | |
parent | 2a1705f4932f446c67074e46bd5fa9098920122d (diff) | |
download | numpy-3beebbc0164afbbcc2b6840cf56174c6c073bb40.tar.gz |
DEP: Remove deprecated modules numarray and oldnumeric.
They were deprecated in 1.8 and scheduled for removal in 1.9.
Closes #3637.
Diffstat (limited to 'numpy/numarray/util.py')
-rw-r--r-- | numpy/numarray/util.py | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/numpy/numarray/util.py b/numpy/numarray/util.py deleted file mode 100644 index b8e37a28d..000000000 --- a/numpy/numarray/util.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import division, absolute_import, print_function - -import os -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 - - -def handleError(errorStatus, sourcemsg): - """Take error status and use error mode to handle it.""" - modes = np.geterr() - 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 & np.FPE_DIVIDEBYZERO: - if modes['dividebyzero'] == "warn": - print("Warning: Encountered divide by zero(s)", sourcemsg) - if modes['dividebyzero'] == "raise": - raise ZeroDivisionError(sourcemsg) - if errorStatus & np.FPE_OVERFLOW: - if modes['overflow'] == "warn": - print("Warning: Encountered overflow(s)", sourcemsg) - if modes['overflow'] == "raise": - raise NumOverflowError(sourcemsg) - if errorStatus & np.FPE_UNDERFLOW: - if modes['underflow'] == "warn": - print("Warning: Encountered underflow(s)", sourcemsg) - if modes['underflow'] == "raise": - raise UnderflowError(sourcemsg) - - -def get_numarray_include_dirs(): - base = os.path.dirname(np.__file__) - newdirs = [os.path.join(base, 'numarray', 'include')] - return newdirs |