<SYSTEM_TASK:>
Given the following text problem statement, write Python code to implement the functionality described below in problem statement
<END_TASK>
<USER_TASK:>
Problem:
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.
<ASSISTANT_TASK:>
Python Code:
import numpy as np
import scipy.ndimage
x = np.arange(9).reshape(3, 3)
shape = (6, 8)
result = scipy.ndimage.zoom(x, zoom=(shape[0]/x.shape[0], shape[1]/x.shape[1]), order=1)
<END_TASK>