class_docstr: Test SLSQP algorithm using Example 14.4 from Numerical Methods for
  Engineers by Steven Chapra and Raymond Canale.
  This example maximizes the function f(x) = 2*x*y + 2*x - x**2 - 2*y**2,
  which has a maximum at x=2, y=1.
class_docstr_tok: ["Test","SLSQP","algorithm","using","Example","14.4","from","Numerical","Methods","for","Engineers","by","Steven","Chapra","and","Raymond","Canale",".","This","example","maximizes","the","function","f","(","x",")","=","2","*","x","*","y","+","2","*","x","-","x","*","*","2","-","2","*","y","*","*","2",",","which","has","a","maximum","at","x=2",",","y=1","."]
code: def test_gh9640(self):
      np.random.seed(10)
      cons = (
          {"type": "ineq", "fun": lambda x: -x[0] - x[1] - 3},
          {"type": "ineq", "fun": lambda x: x[1] + x[2] - 2},
      )
      bnds = ((-2, 2), (-2, 2), (-2, 2))
  
      target = lambda x: 1
      x0 = [
          -1.8869783504471584,
          -0.640096352696244,
          -0.8174212253407696,
      ]
      res = minimize(
          target,
          x0,
          method="SLSQP",
          bounds=bnds,
          constraints=cons,
          options={"disp": False, "maxiter": 10000},
      )
  
      # The problem is infeasible, so it cannot succeed
      assert not res.success
  
imports: from numpy.testing import assert_, assert_array_almost_equal, assert_allclose, assert_equal
  from pytest import raises
  import pytest
  import numpy
  from scipy.optimize import fmin_slsqp, minimize, Bounds, NonlinearConstraint
label_desc: Use image node_id 48 for calling the TestSLSQP obj's underlying member method code with example usage: obj.test_gh9640() without return types