Use CartesianIndices((nrow, ncol)): See https://
x = rand((7, 10))
CI = CartesianIndices((7, 10))
for i in eachindex(x)
r = CI[i][1]
c = CI[i][2]
@assert x[i] == x[r, c]
endThis notebook was generated using Literate.jl.
Use CartesianIndices((nrow, ncol)): See https://
x = rand((7, 10))
CI = CartesianIndices((7, 10))
for i in eachindex(x)
r = CI[i][1]
c = CI[i][2]
@assert x[i] == x[r, c]
endThis notebook was generated using Literate.jl.