What is the simplest way to transform an array of the form
{{{{a11, a12}, {a21, a22}},
{{a13, a14}, {a23, a24}}},
{{{a31, a32}, {a41, a42}},
{{a33, a34}, {a43, a44}}}}
To the matrix
{{a11,a12,a13,a14},
{a21,a22,a23,a24},
{a31,a32,a33,a34},
{a41,a42,a43,a44}}
I understand I should use Flatten, but I cannot figure out how to denote the levels.
{{1,3},{2,4}}works? – tst May 09 '19 at 21:19Flatten[]levels, you can also Flatten it "all the way" and then Partition it back into 4-element lists, e.g.,{{{{a11, a12}, {a21, a22}}, {{a13, a14}, {a23, a24}}}, {{{a31, a32}, {a41, a42}}, {{a33, a34}, {a43, a44}}}} // Flatten // Partition[#, 4]&– Joshua Schrier May 09 '19 at 21:24{{1,3},{2,4}}can be found in Flatten command: matrix as second argument. Not sure about "simple", however :) – WReach May 09 '19 at 21:41