Resampling a numpy array representing an image
Based on your description, you want scipy.ndimage.zoom. Bilinear interpolation would be order=1, nearest is order=0, and cubic is the default (order=3). zoom is specifically for regularly-gridded data that you want to resample to a new resolution. As a quick example: import numpy as np import scipy.ndimage x = np.arange(9).reshape(3,3) print ‘Original array:’ print x print … Read more