This is a pre-release version (2.0.0.dev0+git20260907.41eeb59).Go to latest (1.18.0)
{ } Raw JSON

bundles / scipy 2.0.0.dev0+git20260907.41eeb59 / scipy / optimize / _lsq / common / find_active_constraints

function

scipy.optimize._lsq.common:find_active_constraints

source: build-install/usr/lib/python3.14/site-packages/scipy/optimize/_lsq/common.py:401

Signature

def find_active_constraints(x, lb, ub, rtol = 1e-10)

Summary

Determine which constraints are active in a given point.

Extended Summary

The threshold is computed using rtol and the absolute value of the closest bound.

Returns

active : ndarray of int with shape of x

Each component shows whether the corresponding constraint is active:

  • 0 - a constraint is not active.

  • -1 - a lower bound is active.

  • 1 - an upper bound is active.

Aliases

  • scipy.optimize._lsq.common.find_active_constraints