Alternatives to python griddata
问题 I am using griddata to resample a numpy 2 dimensional array on a grid. z.shape = (1000, 1000) x, y = np.arange(-5, 5, 0.01), np.arange(-5, 5, 0.01) newx, newy = np.arange(-2, 2, 0.1), np.arange(-2, 2, 0.1) griddata((x, y), z, (newx[None, :], newy[:, None])) The code should: resample z (which represents an image) to a new coarser or finer grid the new grid does not necessarily cover all of the original one. However griddata cannot manage a regular input grid. Does anyone know an easy