diff options
Diffstat (limited to 'numpy/core/_internal.py')
-rw-r--r-- | numpy/core/_internal.py | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/numpy/core/_internal.py b/numpy/core/_internal.py index 1d3bb5584..82035e561 100644 --- a/numpy/core/_internal.py +++ b/numpy/core/_internal.py @@ -10,7 +10,6 @@ import re import sys from numpy.compat import unicode -from numpy.core.overrides import set_module from .multiarray import dtype, array, ndarray try: import ctypes @@ -795,29 +794,6 @@ def _gcd(a, b): def _lcm(a, b): return a // _gcd(a, b) * b -# Exception used in shares_memory() -@set_module('numpy') -class TooHardError(RuntimeError): - pass - -@set_module('numpy') -class AxisError(ValueError, IndexError): - """ Axis supplied was invalid. """ - def __init__(self, axis, ndim=None, msg_prefix=None): - # single-argument form just delegates to base class - if ndim is None and msg_prefix is None: - msg = axis - - # do the string formatting here, to save work in the C code - else: - msg = ("axis {} is out of bounds for array of dimension {}" - .format(axis, ndim)) - if msg_prefix is not None: - msg = "{}: {}".format(msg_prefix, msg) - - super(AxisError, self).__init__(msg) - - def array_ufunc_errmsg_formatter(dummy, ufunc, method, *inputs, **kwargs): """ Format the error message for when __array_ufunc__ gives up. """ args_string = ', '.join(['{!r}'.format(arg) for arg in inputs] + |