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_equality_given(self):
      # SLSQP: equality constraint, given jacobian.
      res = fmin_slsqp(
          self.fun,
          [-1.0, 1.0],
          fprime=self.jac,
          args=(-1.0,),
          eqcons=[self.f_eqcon],
          iprint=0,
          full_output=1,
      )
      x, fx, its, imode, smode = res
      assert_(imode == 0, imode)
      assert_array_almost_equal(x, [1, 1])
  
imports: from __future__ import division, print_function, absolute_import
  import pytest
  from numpy.testing import assert_, assert_array_almost_equal, assert_allclose, assert_equal
  from pytest import raises
  import numpy
  from scipy.optimize import fmin_slsqp, minimize, NonlinearConstraint, Bounds
label_desc: Use image node_id 27 for calling the TestSLSQP obj's underlying member method code with example usage: obj.test_equality_given() without return types