Fix misshapen transform when axes specified
Fix misshapen transform when axes specified

By sorting the axes before applying _cook_shape it would resize the wrong axes.

cupy/cupy,cupy/cupy,cupy/cupy,cupy/cupy