This should work for your shapes:
x = torch.arange(5*6).view(5, 6)
print(x)

y = x.permute(1, 0).contiguous().view(3, 10).permute(1, 0)
print(y)

I’m unsure what the most efficient way would be so let’s wait if others can come up with a better approach.