I am truly lost at following example. I appreciate any directions, I seem to understand all previous examples, but this one just made me dazzle.
Julia 1.10 manual array indexing section
If I_1 is changed to a two-dimensional matrix, then X becomes an n+1-dimensional array of shape (size(I_1, 1), size(I_1, 2), length(I_2), …, length(I_n)). The matrix adds a dimension.
julia> A = reshape(collect(1:16), (2, 2, 2, 2));
julia> A[[1 2; 1 2]]
2×2 Matrix{Int64}:
1 2
1 2
julia> A[[1 2; 1 2], 1, 2, 1]
2×2 Matrix{Int64}:
5 6
5 6
The location i_1, i_2, i_3, …, i_{n+1} contains the value at A[I_1[i_1, i_2], I_2[i_3], …, I_n[i_{n+1}]]. All dimensions indexed with scalars are dropped. For example, if J is an array of indices, then the result of A[2, J, 3] is an array with size size(J). Its jth element is populated by A[2, J[j], 3].