cvxpy
A Python-embedded modeling language for convex optimization problems.
Science Score: 36.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
34 of 219 committers (15.5%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.6%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
A Python-embedded modeling language for convex optimization problems.
Basic Info
- Host: GitHub
- Owner: cvxpy
- License: apache-2.0
- Language: C++
- Default Branch: master
- Homepage: https://www.cvxpy.org
- Size: 205 MB
Statistics
- Stars: 5,878
- Watchers: 127
- Forks: 1,118
- Open Issues: 266
- Releases: 57
Topics
Metadata Files
README.md
CVXPY
The CVXPY documentation is at cvxpy.org.
We are building a CVXPY community on Discord. Join the conversation! For issues and long-form discussions, use Github Issues and Github Discussions.
Contents - Installation - Getting started - Issues - Community - Contributing - Team - Citing
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:
```python3 import cvxpy as cp import numpy
Problem data.
m = 30 n = 20 numpy.random.seed(1) A = numpy.random.randn(m, n) b = numpy.random.randn(m)
Construct the problem.
x = cp.Variable(n) objective = cp.Minimize(cp.sum_squares(A @ x - b)) constraints = [0 <= x, x <= 1] prob = cp.Problem(objective, constraints)
The optimal objective is returned by prob.solve().
result = prob.solve()
The optimal value for x is stored in x.value.
print(x.value)
The optimal Lagrange multiplier for a constraint
is stored in constraint.dual_value.
print(constraints[0].dual_value) ```
With CVXPY, you can model * convex optimization problems, * mixed-integer convex optimization problems, * geometric programs, and * quasiconvex programs.
CVXPY is not a solver. It relies upon the open source solvers Clarabel, SCS, and OSQP. Additional solvers are available, but must be installed separately.
CVXPY began as a Stanford University research project. It is now developed by many people, across many institutions and countries.
Installation
CVXPY is available on PyPI, and can be installed with
pip install cvxpy
CVXPY can also be installed with conda, using
conda install -c conda-forge cvxpy
CVXPY has the following dependencies:
- Python >= 3.11
- Clarabel >= 0.5.0
- OSQP >= 0.6.2
- SCS >= 3.2.4.post1
- NumPy >= 1.22.4
- SciPy >= 1.13.0
For detailed instructions, see the installation guide.
Getting started
To get started with CVXPY, check out the following: * official CVXPY tutorial * example library * API reference
Issues
We encourage you to report issues using the Github tracker. We welcome all kinds of issues, especially those related to correctness, documentation, performance, and feature requests.
For basic usage questions (e.g., "Why isn't my problem DCP?"), please use StackOverflow instead.
Community
The CVXPY community consists of researchers, data scientists, software engineers, and students from all over the world. We welcome you to join us!
- To chat with the CVXPY community in real-time, join us on Discord.
- To have longer, in-depth discussions with the CVXPY community, use Github Discussions.
- To share feature requests and bug reports, use Github Issues.
Please be respectful in your communications with the CVXPY community, and make sure to abide by our code of conduct.
Contributing
We appreciate all contributions. You don't need to be an expert in convex optimization to help out.
You should first install CVXPY from source. Here are some simple ways to start contributing immediately: * Read the CVXPY source code and improve the documentation, or address TODOs * Enhance the website documentation * Browse the issue tracker, and look for issues tagged as "help wanted" * Polish the example library * Add a benchmark
If you'd like to add a new example to our library, or implement a new feature, please get in touch with us first to make sure that your priorities align with ours.
Contributions should be submitted as pull requests. A member of the CVXPY development team will review the pull request and guide you through the contributing process.
Before starting work on your contribution, please read the contributing guide.
Team
CVXPY is a community project, built from the contributions of many researchers and engineers.
CVXPY is developed and maintained by Steven Diamond, Akshay Agrawal, Riley Murray, Philipp Schiele, Bartolomeo Stellato, and Parth Nobel, with many others contributing significantly. A non-exhaustive list of people who have shaped CVXPY over the years includes Stephen Boyd, Eric Chu, Robin Verschueren, Jaehyun Park, Enzo Busseti, AJ Friend, Judson Wilson, Chris Dembia, and William Zhang.
For more information about the team and our processes, see our governance document.
Citing
If you use CVXPY for academic work, we encourage you to cite our papers. If you use CVXPY in industry, we'd love to hear from you as well, on Discord or over email.
Owner
- Name: CVXPY
- Login: cvxpy
- Kind: organization
- Website: https://www.cvxpy.org/
- Twitter: cvxpy_team
- Repositories: 7
- Profile: https://github.com/cvxpy
A Python-embedded modeling language for convex optimization
GitHub Events
Total
- Create event: 96
- Release event: 17
- Issues event: 128
- Watch event: 484
- Delete event: 60
- Issue comment event: 773
- Push event: 282
- Pull request event: 379
- Pull request review comment event: 349
- Pull request review event: 470
- Fork event: 73
Last Year
- Create event: 96
- Release event: 17
- Issues event: 128
- Watch event: 484
- Delete event: 60
- Issue comment event: 773
- Push event: 282
- Pull request event: 379
- Pull request review comment event: 349
- Pull request review event: 470
- Fork event: 73
Committers
Last synced: over 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| Steven Diamond | s****2@s****u | 1,687 |
| Akshay Agrawal | a****7@g****m | 314 |
| Steven Diamond | d****d@c****u | 153 |
| phschiele | 4****e | 108 |
| Robin | r****n@g****m | 63 |
| Riley Murray | r****y | 58 |
| rileyjmurray | i****8@g****m | 58 |
| AJ Friend | a****d@g****m | 55 |
| Jaehyun Park | j****k@c****u | 47 |
| Akshay Agrawal | a****a@c****u | 37 |
| Bartolomeo Stellato | b****o@g****m | 27 |
| Eric Chu | e****u@g****m | 21 |
| William Zijie Zhang | 8****n | 20 |
| Richard Barnes | r****s@u****u | 20 |
| dependabot[bot] | 4****] | 19 |
| Parth Nobel | p****l@b****u | 17 |
| Judson Wilson | w****n@g****m | 16 |
| sschnug | u****e | 15 |
| Christopher Dembia | c****2@c****u | 14 |
| Robert McGibbon | r****o@g****m | 14 |
| Matt Wytock | m****k@g****m | 14 |
| macklin | m****n@s****r | 14 |
| Tri Dao | t****q@g****m | 13 |
| Steven Diamond | d****l@g****m | 13 |
| Paul | 9****k | 12 |
| aszekMosek | m****k@m****m | 11 |
| Eric Chu | e****u | 11 |
| alex | a****i@n****u | 9 |
| Misrab Faizullah-Khan | f****b@g****m | 8 |
| Aryaman Jeendgar | 5****r | 7 |
| and 189 more... | ||
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 332
- Total pull requests: 861
- Average time to close issues: 6 months
- Average time to close pull requests: 14 days
- Total issue authors: 220
- Total pull request authors: 95
- Average comments per issue: 3.13
- Average comments per pull request: 2.58
- Merged pull requests: 585
- Bot issues: 0
- Bot pull requests: 146
Past Year
- Issues: 96
- Pull requests: 423
- Average time to close issues: 17 days
- Average time to close pull requests: 8 days
- Issue authors: 61
- Pull request authors: 49
- Average comments per issue: 1.33
- Average comments per pull request: 2.07
- Merged pull requests: 235
- Bot issues: 0
- Bot pull requests: 88
Top Authors
Issue Authors
- Transurgeon (19)
- rileyjmurray (14)
- phschiele (11)
- langestefan (6)
- yasirroni (5)
- adishavit (5)
- akshayka (5)
- warwickmm (5)
- govindchari (5)
- carlosgmartin (5)
- tschm (4)
- jonathanberthias (4)
- SteveDiamond (4)
- sdementen (4)
- enzbus (4)
Pull Request Authors
- Transurgeon (221)
- dependabot[bot] (146)
- phschiele (82)
- SteveDiamond (54)
- PTNobel (49)
- govindchari (28)
- tschm (24)
- Paulnkk (13)
- r-barnes (11)
- maxschaller (8)
- rileyjmurray (8)
- senhalil (8)
- enzbus (7)
- aryamanjeendgar (7)
- mlubin (7)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 8
-
Total downloads:
- pypi 2,364,129 last-month
- Total docker downloads: 26,512
-
Total dependent packages: 225
(may contain duplicates) -
Total dependent repositories: 2,353
(may contain duplicates) - Total versions: 400
- Total maintainers: 5
pypi.org: cvxpy
A domain-specific language for modeling convex optimization problems in Python.
- Homepage: https://github.com/cvxpy/cvxpy
- Documentation: https://cvxpy.readthedocs.io/
- License: Apache License, Version 2.0
-
Latest release: 1.7.2
published 6 months ago
Rankings
pypi.org: cvxpy-base
A domain-specific language for modeling convex optimization problems in Python.
- Homepage: https://github.com/cvxpy/cvxpy
- Documentation: https://cvxpy-base.readthedocs.io/
- License: Apache License, Version 2.0
-
Latest release: 1.7.2
published 6 months ago
Rankings
conda-forge.org: cvxpy
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.
- Homepage: http://www.cvxpy.org/
- License: Apache-2.0
-
Latest release: 1.2.2
published over 3 years ago
Rankings
alpine-edge: py3-cvxpy-pyc
Precompiled Python bytecode for py3-cvxpy
- Homepage: https://github.com/cvxpy/cvxpy
- License: Apache-2.0
-
Latest release: 1.2.1-r5
published over 1 year ago
Rankings
Maintainers (1)
alpine-edge: py3-cvxpy
a Python-embedded modeling language for convex optimization problems
- Homepage: https://github.com/cvxpy/cvxpy
- License: Apache-2.0
-
Latest release: 1.2.1-r5
published over 1 year ago
Rankings
Maintainers (1)
proxy.golang.org: github.com/cvxpy/cvxpy
- Documentation: https://pkg.go.dev/github.com/cvxpy/cvxpy#section-documentation
- License: apache-2.0
-
Latest release: v1.7.2
published 6 months ago
Rankings
conda-forge.org: cvxpy-base
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.
- Homepage: http://www.cvxpy.org/
- License: Apache-2.0
-
Latest release: 1.2.2
published over 3 years ago
Rankings
pypi.org: tyba-cvxpy
A domain-specific language for modeling convex optimization problems in Python.
- Homepage: https://github.com/cvxpy/cvxpy
- Documentation: https://tyba-cvxpy.readthedocs.io/
- License: Apache License, Version 2.0
-
Latest release: 1.6.0
published over 1 year ago
Rankings
Maintainers (1)
Dependencies
- alabaster *
- cloud_sptheme *
- cvxpy *
- ecos *
- numpy *
- numpydoc *
- recommonmark *
- scipy *
- scs *
- sphinx *
- ecos *
- numpy *
- osqp *
- scipy *
- scs *
- ecos *
- numpy *
- osqp *
- scipy *
- scs *
- JamesIves/github-pages-deploy-action v4.2.2 composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
- SonarSource/sonarcloud-github-action master composite
- actions/checkout v2 composite
- actions/download-artifact v2 composite
- actions/setup-python v2 composite
- actions/upload-artifact v1 composite
- actions/upload-artifact v2 composite
- conda-incubator/setup-miniconda v2 composite
- jamescurtin/isort-action master composite
- joerick/cibuildwheel v2.11.2 composite
- py-actions/flake8 v1 composite
- rokroskar/workflow-run-cleanup-action master composite
- JamesIves/github-pages-deploy-action v4.2.2 composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
- actions/github-script v6 composite
- peter-evans/create-or-update-comment v2 composite
- peter-evans/find-comment v2 composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
- actions/upload-artifact v3 composite
- actions/checkout a12a3943b4bdde767164f792f33f40b04645d846 composite
- actions/upload-artifact 6673cd052c4cd6fcf4b4e6e60ea986c889389535 composite
- github/codeql-action/upload-sarif 5f532563584d71fdef14ee64d17bafb34f751ce5 composite
- ossf/scorecard-action 99c53751e09b9529366343771cc321ec74e9bd3d composite
- actions/checkout v2 composite
- actions/setup-python v2 composite