'Test quad form with a sparse matrix.'

def test_sparse_quad_form(self):

    Q = sp.eye(2)
    x = cvxpy.Variable(2)
    cost = cvxpy.quad_form(x, Q)
    prob = cvxpy.Problem(cvxpy.Minimize(cost), [(x == [1, 2])])
    self.assertAlmostEqual(prob.solve(), 5)
