bundles / scipy latest / scipy / optimize / _optimize / _line_for_search
function
scipy.optimize._optimize:_line_for_search
Signature
def _line_for_search ( x0 , alpha , lower_bound , upper_bound ) Summary
Given a parameter vector x0 with length n and a direction vector alpha with length n, and lower and upper bounds on each of the n parameters, what are the bounds on a scalar l such that lower_bound <= x0 + alpha * l <= upper_bound.
Parameters
x0: np.array.The vector representing the current location. Note
np.shape(x0) == (n,).alpha: np.array.The vector representing the direction. Note
np.shape(alpha) == (n,).lower_bound: np.array.The lower bounds for each parameter in
x0. If thei``th parameter in ``x0is unbounded below, thenlower_bound[i]should be-np.inf. Notenp.shape(lower_bound) == (n,).upper_bound: np.array.The upper bounds for each parameter in
x0. If thei``th parameter in ``x0is unbounded above, thenupper_bound[i]should benp.inf. Notenp.shape(upper_bound) == (n,).
Returns
res: tuple ``(lmin, lmax)``
Aliases
-
scipy.optimize._optimize._line_for_search