{ } Raw JSON

bundles / scipy 1.17.1 / scipy / optimize / _lsq / common / solve_trust_region_2d

function

scipy.optimize._lsq.common:solve_trust_region_2d

source: /scipy/optimize/_lsq/common.py :171

Signature

def   solve_trust_region_2d ( B g Delta )

Summary

Solve a general trust-region problem in 2 dimensions.

Extended Summary

The problem is reformulated as a 4th order algebraic equation, the solution of which is found by numpy.roots.

Parameters

B : ndarray, shape (2, 2)

Symmetric matrix, defines a quadratic term of the function.

g : ndarray, shape (2,)

Defines a linear term of the function.

Delta : float

Radius of a trust region.

Returns

p : ndarray, shape (2,)

Found solution.

newton_step : bool

Whether the returned solution is the Newton step which lies within the trust region.

Aliases

  • scipy.optimize._lsq.common.solve_trust_region_2d