--- id: quadprog version: "0.1.13" license: GPLv2+ license_treatment: copyleft maintenance: dormant --- # quadprog — Quadratic Programming Solver License: copyleft · Maintenance: dormant · Downloads: 592.7K/mo ## What it is and what it does quadprog is a Python wrapper around a numerically stable dual algorithm for solving strictly convex quadratic programs. It takes a quadratic objective function and linear inequality constraints, then returns the optimal solution vector. The underlying implementation uses the Goldfarb/Idnani method, a well-established approach from mathematical programming literature. The package depends only on numpy at runtime and provides pre-compiled wheels for modern Python versions across macOS, Linux, and Windows, making installation straightforward on common platforms. It is intended for education, financial modeling, insurance applications, and scientific research where constrained quadratic optimization is needed. Use it for: - Portfolio optimization in finance: minimize variance subject to budget and allocation constraints. - Support vector machine training: solve the dual QP formulation for classification. - Robotics and control: compute optimal control inputs under linear constraints. - Machine learning: solve constrained least-squares problems in regression pipelines. - Operations research: optimize resource allocation with linear inequality constraints. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Solves strictly convex quadratic programming problems using the Goldfarb/Idnani dual algorithm, minimizing a quadratic objective subject to linear inequality constraints. Yes, if you need a lightweight, numerically stable QP solver for strictly convex problems and can accept GPLv2+ licensing. The pre-built wheels make installation frictionless on standard platforms. The dormant maintenance status (659 days since last release) is acceptable for a mature numerical library with no known vulnerabilities, but verify that the Goldfarb/Idnani algorithm meets your problem's scale and precision requirements before committing to production use. ## Install pip install quadprog uv add quadprog poetry add quadprog ## Installing quadprog Before you install: Medium install friction due to compiled C extension; pre-built wheels available for Python 3.9–3.13 on macOS (x86_64 and arm64), Linux (x86_64), and Windows (amd64). Package is dormant (last release 659 days ago) but repository remains active with no archived status. License in practice: Licensed under GPLv2+, a copyleft license requiring derivative works to be distributed under the same terms. Acceptable for research, education, and open-source projects; may restrict use in proprietary closed-source applications. Quickstart: import numpy as np from quadprog import solve_qp G = np.array([[1., 0.], [0., 1.]]) a = np.array([0., 0.]) C = np.array([[1., 1.], [-1., 1.]]) b = np.array([1., 1.]) result = solve_qp(G, a, C.T, b) Requires a C compiler if installing from source distribution (sdist); pre-built wheels eliminate this requirement on supported platforms. Verify before relying: - Whether the package handles numerical stability edge cases beyond the Goldfarb/Idnani algorithm's guarantees. - Performance characteristics and scalability for large-scale problems (matrix dimensions, constraint count). - Active maintenance roadmap or community support channels given dormant release status. ## Package facts - License: GPLv2+ (copyleft) - Python support: supports_current - Install friction: medium - Maintenance: dormant - Downloads: 592.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags quadratic programming solver, convex optimization, constrained quadratic minimization, qp solver python, goldfarb idnani algorithm, linear constraint optimization, mathematical programming, optimization, numerical-computing, convex-programming [View on SkillFed](https://skillfed.io/packages/quadprog) · [View on PyPI](https://pypi.org/project/quadprog/)