Take a look at CartesianIndices:
x = rand((7, 10))
CI = CartesianIndices((7, 10))
for i in 1:length(x)
r = CI[i][1]
c = CI[i][2]
@assert x[i] == x[r, c]
end
Take a look at CartesianIndices:
x = rand((7, 10))
CI = CartesianIndices((7, 10))
for i in 1:length(x)
r = CI[i][1]
c = CI[i][2]
@assert x[i] == x[r, c]
end