Numba Lowering error when iterating over 3D array
<p>I have a 3D array (n, 3,2) for holding groups of three 2D vectors and I'm iterating over them something like this:</p>

<pre><code>import numpy as np
for x in np.zeros((n,2,3), dtype=np.float64):
     print(x) # for example
</code></pre>

<p>With normal numpy this works fine but when I wrap the function in question in a</p>

<pre><code> @numba.jit(nopython=True)
</code></pre>

<p>I get an error like the one below.</p>

<pre><code>numba.errors.LoweringError: Failed at nopython (nopython mode backend)
iterating over 3D array
File "paint.py", line 111
[1] During: lowering "$77.2 = iternext(value=$phi77.1)" at paint.py (111)
</code></pre>

<p>For reference the actual code is <a href="https://github.com/charlieb/paint/blob/master/paint.py" rel="nofollow">here</a></p>

<p>It looks like this is just not implemented. </p>

<pre><code>In [13]: @numba.njit
    ...: def f(v):
    ...:     for x in v:
    ...:         y = x
    ...:     return y

In [14]: f(np.zeros((2,2,2)))
NotImplementedError                       Traceback (most recent call last)
&lt;snip&gt;
LoweringError: Failed at nopython (nopython mode backend)
iterating over 3D array
File "&lt;ipython-input-13-788b4772d1d9&gt;", line 3
[1] During: lowering "$7.2 = iternext(value=$phi7.1)" at &lt;ipython-input-13-788b4772d1d9&gt; (3)
</code></pre>

<p>Seem to works ok if you loop using the index.</p>

<pre><code>In [15]: @numba.njit
    ...: def f(v):
    ...:     for i in range(len(v)):
    ...:         y = v[i]
    ...:     return y

In [16]: f(np.zeros((2,2,2)))
Out[16]: 
array([[ 0.,  0.],
       [ 0.,  0.]])
</code></pre>

python numpy numba