Converting a vector image to matrix
One alternative is to transform it to the right shapes, then use moveaxis. I don't know how much simpler this is than what you've got, I guess it avoids one reshaping operation.

img = img.reshape(3, 32, 32)
img = np.moveaxis(img, 0, -1) # move the first axis to the end


or as a one-liner:

img = np.moveaxis(img.reshape(3, 32, 32), 0, -1)


Note that moveaxis returns a view, meaning that no data is copied.