SciPy

scipy.interpolate.SmoothBivariateSpline.get_residual

SmoothBivariateSpline.get_residual()[source]

Return weighted sum of squared residuals of the spline approximation: sum ((w[i]*(z[i]-s(x[i],y[i])))**2,axis=0)