summaryrefslogtreecommitdiff
path: root/numpy/lib/index_tricks.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/lib/index_tricks.py')
-rw-r--r--numpy/lib/index_tricks.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/numpy/lib/index_tricks.py b/numpy/lib/index_tricks.py
index 0560bd36d..d145477c3 100644
--- a/numpy/lib/index_tricks.py
+++ b/numpy/lib/index_tricks.py
@@ -368,8 +368,10 @@ class AxisConcatenator:
if len(vec) == 3:
trans1d = int(vec[2])
continue
- except Exception:
- raise ValueError("unknown special directive")
+ except Exception as e:
+ raise ValueError(
+ "unknown special directive {!r}".format(item)
+ ) from e
try:
axis = int(item)
continue
@@ -597,8 +599,6 @@ class ndenumerate:
def __iter__(self):
return self
- next = __next__
-
@set_module('numpy')
class ndindex:
@@ -665,8 +665,6 @@ class ndindex:
next(self._it)
return self._it.multi_index
- next = __next__
-
# You can do all this with slice() plus a few special objects,
# but there's a lot to remember. This version is simpler because