Examples

These examples show many different ways to use CVXPY.

There are also application-specific sections.

Most of these examples are implemented as Jupyter notebooks, while some are implemented as interactive marimo notebooks.

Basic examples

For geometric interpretations of linear and quadratic programs, see the marimo links.

Basic applications

Disciplined geometric programming

Disciplined quasiconvex programming

Derivatives

Machine learning

Finance

Advanced

Advanced applications