xx = numpy.linspace(x.min(), x.max(), outKSize)
yy = numpy.linspace(y.min(), y.max(), outKSize)
newKernel = interpolate.RectBivariateSpline(x, y, z, kx=2, ky=2)
kernelOut = newKernel(xx, yy)
print(kernelOut)
Scipy interpolation how to resize/resample 3x3 matrix to 5x5?