Permalink
Browse files

Retain backward compatibility. Enforce C order.

  • Loading branch information...
stefanv committed Sep 2, 2012
1 parent 942bdb2 commit bb0e4f356cce2f199d9c08ffe572fbabadc846d1
Showing with 9 additions and 1 deletion.
  1. +9 −1 numpy/lib/index_tricks.py
View
@@ -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.

0 comments on commit bb0e4f3

Please sign in to comment.