diff options
Diffstat (limited to 'numpy/lib/index_tricks.py')
-rw-r--r-- | numpy/lib/index_tricks.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/numpy/lib/index_tricks.py b/numpy/lib/index_tricks.py index 112a79bd1..b07fde27d 100644 --- a/numpy/lib/index_tricks.py +++ b/numpy/lib/index_tricks.py @@ -534,11 +534,19 @@ class ndindex(object): """ def __init__(self, *shape): x = as_strided(_nx.zeros(1), shape=shape, strides=_nx.zeros_like(shape)) - self._it = _nx.nditer(x, flags=['multi_index']) + self._it = _nx.nditer(x, flags=['multi_index'], order='C') def __iter__(self): return self + def ndincr(self): + """ + Increment the multi-dimensional index by one. + + This method is for backward compatibility only: do not use. + """ + self.next() + def next(self): """ Standard iterator method, updates the index and returns the index tuple. |