np.transpose should do the trick:
x = torch.cat((torch.ones(1, 24, 24),
               torch.ones(1, 24, 24)*2,
               torch.ones(1, 24, 24)*3), 0)

permute = [2, 1, 0]
x = x[permute, :, :]
y = x.numpy()
c, h, w = y.shape
y = y.transpose(1, 2, 0)