I can't find an answer to this simple question.
I have the following:
A(a,j)=[a*j*i*k for i in 1:2, k in 1:2];
B=[A(a,j) for a in 1:2, j in 1:2];
B is a an array of arrays: 2×2 Array{Array{Int64,2},2}. This is useful to easily access the subarrays with indices (e.g., B[2,1]). However, I also need to convert B to a 4 by 4 matrix. I tried hcat(B...) but that yields a 2 by 8 matrix, and other options are worse (e.g., cat(Test2...;dims=(2,1))).
Is there an efficient way of writing B as a matrix while keeping the ability to easily access its subarrays, especially as B gets very large?
[B[1,1] B[1,2]; B[2,1] B[2,2]]?