code: def test_evaluate_quadratic(self):
      s = np.array([1.0, -1.0])
  
      value = evaluate_quadratic(self.J, self.g, s)
      assert_equal(value, 4.85)
  
      value = evaluate_quadratic(self.J, self.g, s, diag=self.diag)
      assert_equal(value, 6.35)
  
      s = np.array([[1.0, -1.0], [1.0, 1.0], [0.0, 0.0]])
  
      values = evaluate_quadratic(self.J, self.g, s)
      assert_allclose(values, [4.85, -0.91, 0.0])
  
      values = evaluate_quadratic(self.J, self.g, s, diag=self.diag)
      assert_allclose(values, [6.35, 0.59, 0.0])
  
file_path: scipy/scipy/optimize/tests/test_lsq_common.py
imports: from numpy.testing import assert_, assert_allclose, assert_equal
  from pytest import raises
  import numpy
  from scipy.optimize._lsq.common import step_size_to_bound, find_active_constraints, make_strictly_feasible, CL_scaling_vector, intersect_trust_region, build_quadratic_1d, minimize_quadratic_1d, evaluate_quadratic, reflective_transformation, left_multiplied_operator, right_multiplied_operator
label_desc: Use image node_id 4 for calling the TestQuadraticFunction obj's underlying member method code with example usage: obj.test_evaluate_quadratic() without return types