leastsquare_3d(measured_vals, updated_model, weights, x, y, z)¶
Least square statistic with optional weights. Safer than the general
leastsquare()for 3D models by avoiding numpy methods that support broadcasting.
Measured data values.
Model with parameters set by the current iteration of the optimizer.
Array of weights to apply to each residual.
Independent variable “x” on which to evaluate the model.
Independent variable “y” on which to evaluate the model.
Independent variable “z” on which to evaluate the model.
The sum of least squares.