I am trying to flatten a matrix from 3-dimensional to 2-dimensional one.
The original one has dimension for example {10,120,120}:
list1 = RandomReal[1, {10, 120, 120}];
I want to convert it to a new matrix with {10,120*120} dimension. I am using:
On["Packing"] (*For checking if exist unpacked arrays *)
Flatten[Map[Flatten, {list1}, {-3}], 1];
But this will generate unpacked array. How should I avoid this issue?
Flatten[list1, {{1}, {2, 3}}]
. $\endgroup$