GP wrote (emphasis mine) 'For "2D indexing" into a 1D array'. I presume it's some graphics-related optimization or some pointer arithmetics-related work, but I'd also be curious about some concrete use-cases too.
Julia n-D arrays are stored contiguously in memory. So, you can access the memory by reshaping the array into whatever dimension you want and then access it using the A[i,j,k] syntax.
What does reshape actually do? Create a 1-D array from a 2-D one or vice versa, or just make appear to be so?
It alters the descriptor of the data layout, not how the data is actually stored.