bundles / scipy latest / scipy / optimize / _numdiff / _prepare_bounds
function
scipy.optimize._numdiff:_prepare_bounds
source: build-install/usr/lib/python3.14/site-packages/scipy/optimize/_numdiff.py:206
Signature
def _prepare_bounds(bounds, x0)Summary
Prepares new-style bounds from a two-tuple specifying the lower and upper limits for values in x0. If a value is not bound then the lower/upper bound will be expected to be -np.inf/np.inf.
Examples
_prepare_bounds([(0, 1, 2), (1, 2, np.inf)], [0.5, 1.5, 2.5])
✓(array([0., 1., 2.]), array([ 1., 2., inf]))
Aliases
scipy.optimize._numdiff._prepare_bounds