So, apparently i’m not subtracting all elements of GS with all elements of GG, just the ones where the index matches, but i’m not sure how to do that (without loops of course).
That’s the incorrect answer you get if you just directly reshape to the required shape without a transpose. That doesn’t work because it scrambles the data as explained on this thread.
So your previous code was actually closer, other than that you had the dimensions reversed.
So, just to clarify, i was making something wrong during the reshaping, i inverted the order (did the transpose, then reshaped) and it worked. The Thread you cited helped a lot