Open cycomanic opened 3 years ago
I suspect that this is the same error as #1664. I can simplify to:
#pythran export draw_line(int64[][], int64[])
def draw_line(grid, x):
grid[:,x] = 1
return grid
which results in teh same compile error as above.
On the other hand
#pythran export draw_line(int64[][], int64[])
def draw_line(grid, x):
grid[x,:] = 1
return grid
compiles but does not modify grid, so gives an incorrect result.
Finally
#pythran export draw_line(int64[][], int64[])
def draw_line(grid, x):
grid[x] = 1
return grid
does the right thing.
I've looked at ~numpy_gexpr.hpp~ but that goes beyond my cpp skillset.
Split from #1714
I get a compile error when trying to index an array with a tuple.
Example code:
Compiler error (gcc):
Initially I thought this was related to a having only two elements of the tuple for a 3D array, but the following also yields the same error: