I would like to resample a numpy array as suggested here Resampling a numpy array representing an image however this resampling will do so by a factor i.e.
x = np.arange(9).reshape(3,3)
print scipy.ndimage.zoom(x, 2, order=1)
Will create a shape of (6,6) but how can I resample an array to its best approximation within a (4,6),(6,8) or (6,10) shape for instance?