# optimize.tests.test_least_squares¶

## Module Contents¶

### Classes¶

 BroydenTridiagonal(self,n=100,mode=”sparse”) ExponentialFittingProblem(self,a,b,noise,n_outliers=1,x_range=tuple,n_points=11,random_seed=None) Provide data and function for exponential fitting in the form BaseMixin() BoundsMixin() SparseMixin() LossFunctionMixin() TestDogbox() TestTRF() TestLM()

### Functions¶

 fun_trivial(x,a=0) jac_trivial(x,a=0.0) fun_2d_trivial(x) jac_2d_trivial(x) fun_rosenbrock(x) jac_rosenbrock(x) jac_rosenbrock_bad_dim(x) fun_rosenbrock_cropped(x) jac_rosenbrock_cropped(x) fun_wrong_dimensions(x) jac_wrong_dimensions(x,a=0.0) fun_bvp(x) cubic_soft_l1(z) test_basic()
fun_trivial(x, a=0)
jac_trivial(x, a=0.0)
fun_2d_trivial(x)
jac_2d_trivial(x)
fun_rosenbrock(x)
jac_rosenbrock(x)
fun_rosenbrock_cropped(x)
jac_rosenbrock_cropped(x)
fun_wrong_dimensions(x)
jac_wrong_dimensions(x, a=0.0)
fun_bvp(x)
class BroydenTridiagonal(n=100, mode="sparse")
__init__(n=100, mode="sparse")
fun(x)
_jac(x)
class ExponentialFittingProblem(a, b, noise, n_outliers=1, x_range=tuple, n_points=11, random_seed=None)

Provide data and function for exponential fitting in the form y = a + exp(b * x) + noise.

__init__(a, b, noise, n_outliers=1, x_range=tuple, n_points=11, random_seed=None)
fun(p)
jac(p)
cubic_soft_l1(z)
class BaseMixin
test_basic()
test_args_kwargs()
test_jac_options()
test_nfev_options()
test_x_scale_options()
test_diff_step()
test_incorrect_options_usage()
test_full_result()
test_full_result_single_fev()
test_rosenbrock()
test_rosenbrock_cropped()
test_fun_wrong_dimensions()
test_jac_wrong_dimensions()
test_fun_and_jac_inconsistent_dimensions()
test_x0_multidimensional()
test_x0_complex_scalar()
test_x0_complex_array()
test_bvp()
class BoundsMixin
test_inconsistent()
test_infeasible()
test_wrong_number()
test_inconsistent_shape()
test_in_bounds()
test_bounds_shape()
test_rosenbrock_bounds()
class SparseMixin
test_exact_tr_solver()
test_equivalence()
test_tr_options()
test_wrong_parameters()
test_solver_selection()
test_numerical_jac()
test_with_bounds()
test_wrong_jac_sparsity()
test_linear_operator()
test_x_scale_jac_scale()
class LossFunctionMixin
test_options()
test_fun()