Hello, I have been working with numerical tensors. I have some tensor A where Dimensions[A]={2,2,100,100,100,100}
. I want to create a tensor of the form
Dimensions[A]={2*100*100,2*100*100}
. This can be done for example as Flatten[A,{{1,3,4},{2,5,6}}]
or as ArrayReshape[Transpose[A,...],{2*100*100,2*100*100}]
.
First of all the second option is faster than the first. After comparing with matlabs equivalent I found out that mathematica is 5-10 times slower. I would appreciate any pro tricks to speed up that calculation.