leftTranspose

fun DTensor.leftTranspose(a: Shape, b: Shape): DTensor

Given the shape A,B,D (where A, B and D are lists of Ints, and D is possibly empty), this function converts a tensor of shape A,B,D to a tensor of shape B,A,D, shuffling the data so that the element at position i,j,k is at position j,i,k (where i, j and k are lists of integers corresponding to the shape A, B, and D).