diff options
Diffstat (limited to 'numpy/lib/index_tricks.py')
-rw-r--r-- | numpy/lib/index_tricks.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/lib/index_tricks.py b/numpy/lib/index_tricks.py index 570cd0f1d..f0066be81 100644 --- a/numpy/lib/index_tricks.py +++ b/numpy/lib/index_tricks.py @@ -540,7 +540,8 @@ class ndindex(object): if len(shape) == 1 and isinstance(shape[0], tuple): shape = shape[0] x = as_strided(_nx.zeros(1), shape=shape, strides=_nx.zeros_like(shape)) - self._it = _nx.nditer(x, flags=['multi_index'], order='C') + self._it = _nx.nditer(x, flags=['multi_index', 'zerosize_ok'], + order='C') def __iter__(self): return self |