8000 Retain backward compatibility. Enforce C order. · 87/numpy@bb0e4f3 · GitHub
[go: up one dir, main page]

Skip to content

Commit bb0e4f3

Browse files
committed
Retain backward compatibility. Enforce C order.
1 parent 942bdb2 commit bb0e4f3

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

numpy/lib/index_tricks.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,11 +534,19 @@ class ndindex(object):
534534
"""
535535
def __init__(self, *shape):
536536
x = as_strided(_nx.zeros(1), shape=shape, strides=_nx.zeros_like(shape))
537-
self._it = _nx.nditer(x, flags=['multi_index'])
537+
self._it = _nx.nditer(x, flags=['multi_index'], order='C')
538538

539539
def __iter__(self):
540540
return self
541541

542+
def ndincr(self):
543+
"""
544+
Increment the multi-dimensional index by one.
545+
546+
This method is for backward compatibility only: do not use.
547+
"""
548+
self.next()
549+
542550
def next(self):
543551
"""
544552
Standard iterator method, updates the index and returns the index tuple.

0 commit comments

Comments
 (0)
0