Counting 2,412 Big Data & Machine Learning Frameworks, Toolsets, and Examples...
Suggestion? Feedback? Tweet @stkim1

Last Commit
Feb. 25, 2018
Jul. 1, 2013


Build Status Build status Join the chat at

Join the CVXPY mailing list and Gitter chat for the best CVXPY support!

The CVXPY documentation is at

Try the new, improved CVXPY 1.0, available here. Please report any bugs you find!

CVXPY is a Python-embedded modeling language for convex optimization problems. It allows you to express your problem in a natural way that follows the math, rather than in the restrictive standard form required by solvers.

For example, the following code solves a least-squares problem where the variable is constrained by lower and upper bounds:

from cvxpy import *
import numpy

# Problem data.
m = 30
n = 20
A = numpy.random.randn(m, n)
b = numpy.random.randn(m)

# Construct the problem.
x = Variable(n)
objective = Minimize(sum_squares(A*x - b))
constraints = [0 <= x, x <= 1]
prob = Problem(objective, constraints)

# The optimal objective is returned by prob.solve().
result = prob.solve()
# The optimal value for x is stored in x.value.
# The optimal Lagrange multiplier for a constraint
# is stored in constraint.dual_value.

CVXPY was designed and implemented by Steven Diamond, with input from Stephen Boyd and Eric Chu.

A tutorial and other documentation can be found at

This git repository holds the latest development version of CVXPY. For installation instructions, see the install guide at

Latest Releases
 Aug. 22 2017
 May. 7 2017
 Mar. 13 2017
 Oct. 29 2016
 Oct. 29 2016