Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def solve(P=None, q=None, A=None, l=None, u=None, **settings):
"""
Solve problem of the form
minimize 1/2 x' * P * x + q' * x
subject to l <= A * x <= u
solver settings can be specified as additional keyword arguments.
This function disables the GIL because it internally performs
setup solve and cleanup.
"""
unpacked_data, settings = utils.prepare_data(P, q, A, l, u, **settings)
return _osqp.solve(*unpacked_data, **settings)