Shaping, continued
Another kind of N-shaping requires changing the dimensions (e.g. represent 3x8 grid as a 6x4 grid) but this is not always possible (for instance, if dimension sizes are prime numbers).
Shaping that does not preserve dimensionality is either an inflation or a deflation. The former is not always possible for the same reason as noted above. Also, unless we are trying to inflate a previously deflated grid, adding an artificial dimension might not always make sense.