numpy einsum to get axes permutation,"np.einsum('kij->ijk', M)"