Hi, in a related post [Programming a Block Diagonal] I came across a problem that might be of independent interest for many (I hope it is ok to dedicate a new post to it). While writing a function, I came across a significant problem: I have an array[J,J] of matrices[K,K], i.e.:
matrix[K,K] A[J,J];
matrix[J*K,J*K] B;
Ideally, what I would like to do is to obtain a matrix[JK,JK], i.e. converting the whole array into a big matrix. I naively tried to use the to_matrix() function, but it is only defined on arrays of reals. What should I do? Thanks in advance for the help.