def quadprog(Q, q, G, h, A, b):
    '\n    Input: Numpy arrays, the format follows MATLAB quadprog function: https://www.mathworks.com/help/optim/ug/quadprog.html\n    Output: Numpy array of the solution\n    '
    Q = cvxopt.matrix(Q.tolist())
    q = cvxopt.matrix(q.tolist(), tc='d')
    G = cvxopt.matrix(G.tolist())
    h = cvxopt.matrix(h.tolist())
    A = cvxopt.matrix(A.tolist())
    b = cvxopt.matrix(b.tolist(), tc='d')
    sol = cvxopt.solvers.qp(Q, q.T, G.T, h.T, A.T, b)
    return np.array(sol['x'])
Input: Numpy arrays, the format follows MATLAB quadprog function: https://www.mathworks.com/help/optim/ug/quadprog.html
Output: Numpy array of the solution
def quadprog(Q, q, G, h, A, b):
    '\n    Input: Numpy arrays, the format follows MATLAB quadprog function: https://www.mathworks.com/help/optim/ug/quadprog.html\n    Output: Numpy array of the solution\n    '
    Q = cvxopt.matrix(Q.tolist())
    q = cvxopt.matrix(q.tolist(), tc='d')
    G = cvxopt.matrix(G.tolist())
    h = cvxopt.matrix(h.tolist())
    A = cvxopt.matrix(A.tolist())
    b = cvxopt.matrix(b.tolist(), tc='d')
    sol = cvxopt.solvers.qp(Q, q.T, G.T, h.T, A.T, b)
    return np.array(sol['x'])