{"id":46272445,"url":"https://github.com/pylops/pyproximal","last_synced_at":"2026-04-18T22:01:12.246Z","repository":{"id":37012071,"uuid":"327375352","full_name":"PyLops/pyproximal","owner":"PyLops","description":"PyProximal – Proximal Operators and Algorithms in Python","archived":false,"fork":false,"pushed_at":"2026-02-28T16:18:03.000Z","size":4389,"stargazers_count":81,"open_issues_count":11,"forks_count":18,"subscribers_count":0,"default_branch":"dev","last_synced_at":"2026-03-04T06:24:46.776Z","etag":null,"topics":["inverse-problems","linear-algebra","proximal-algorithms","python"],"latest_commit_sha":null,"homepage":"https://pyproximal.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PyLops.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-01-06T16:56:06.000Z","updated_at":"2026-02-28T16:18:07.000Z","dependencies_parsed_at":"2023-11-26T22:21:05.870Z","dependency_job_id":"abc853e2-9fa8-4f05-a4c6-29cdfca3a056","html_url":"https://github.com/PyLops/pyproximal","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/PyLops/pyproximal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyLops%2Fpyproximal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyLops%2Fpyproximal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyLops%2Fpyproximal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyLops%2Fpyproximal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PyLops","download_url":"https://codeload.github.com/PyLops/pyproximal/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyLops%2Fpyproximal/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31986325,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"ssl_error","status_checked_at":"2026-04-18T20:23:29.375Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["inverse-problems","linear-algebra","proximal-algorithms","python"],"created_at":"2026-03-04T03:31:48.146Z","updated_at":"2026-04-18T22:01:12.239Z","avatar_url":"https://github.com/PyLops.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![PyProximal](https://github.com/PyLops/pyproximal/blob/dev/docs/source/_static/pyproximal_b.png)\n\n[![PyPI version](https://badge.fury.io/py/pyproximal.svg)](https://badge.fury.io/py/pyproximal)\n[![AzureDevOps Status](https://dev.azure.com/matteoravasi/PyLops/_apis/build/status%2FPyLops.pyproximal?branchName=refs%2Fpull%2F180%2Fmerge)](https://dev.azure.com/matteoravasi/PyLops/_build/latest?definitionId=10\u0026branchName=refs%2Fpull%2F180%2Fmerge)\n![GithubAction Status](https://github.com/PyLops/pyproximal/workflows/PyProx/badge.svg)\n[![Documentation Status](https://readthedocs.org/projects/pyproximal/badge/?version=latest)](https://pyproximal.readthedocs.io/en/latest/?badge=latest)\n[![OS-support](https://img.shields.io/badge/OS-linux,osx-850A8B.svg)](https://github.com/PyLops/pyproximal)\n[![Slack Status](https://img.shields.io/badge/chat-slack-green.svg)](https://pylops.slack.com)\n[![DOI](https://joss.theoj.org/papers/10.21105/joss.06326/status.svg)](https://doi.org/10.21105/joss.06326)\n\n\n## Objective\nThis Python library provides all the needed building blocks for solving\nnon-smooth convex optimization problems using the so-called **proximal algorithms**.\n\nWhereas gradient based methods are first-order iterative optimization\nalgorithms for solving unconstrained, smooth optimization problems,\nproximal algorithms can be viewed as an analogous tool for non-smooth and\npossibly constrained versions of these problems. Such algorithms\nsit at a higher level of abstraction than classical algorithms\nlike Steepest descent or Newton’s method and require a basic\noperation to be performed at each iteration: the evaluation of the\nso-called *proximal operator* of the functional to be optimized.\n\nWhilst evaluating a proximal operator does itself require solving a\nconvex optimization problem, these subproblems often admit closed form\nsolutions or can be solved very quickly with ad-hoc specialized methods.\nSeveral of such proximal operators are therefore implemented in this\nlibrary.\n\nHere is a simple example showing how to compute the\nproximal operator of the L1 norm of a vector:\n```python\nimport numpy as np\nfrom pyproximal import L1\n\nl1 = L1(sigma=1.)\nx = np.arange(-5, 5, 0.1)\nxp = l1.prox(x, 1)\n```\nand how this can be used to solve a basic denoising problem of the form:\n``min ||x - y||_2^2 + ||Dx||_1``:\n\n```python\nimport numpy as np\nfrom pylops import FirstDerivative\nfrom pyproximal import L1, L2\nfrom pyproximal.optimization.primal import LinearizedADMM\n\nnp.random.seed(1)\n\n# Create noisy data\nnx = 101\nx = np.zeros(nx)\nx[:nx//2] = 10\nx[nx//2:3*nx//4] = -5\nn = np.random.normal(0, 2, nx)\ny = x + n\n\n# Define functionals\nl2 = L2(b=y)\nl1 = L1(sigma=5.)\nDop = FirstDerivative(nx, edge=True, kind='backward')\n\n# Solve functional with L-ADMM\nL = np.real((Dop.H * Dop).eigs(neigs=1, which='LM')[0])\ntau = 1.\nmu = 0.99 * tau / L\nxladmm, _ = LinearizedADMM(l2, l1, Dop, tau=tau, mu=mu,\n                           x0=np.zeros_like(x), niter=200)\n```\n\n## Why another library for proximal algorithms?\nSeveral other projects in the Python ecosystem provide implementations of proximal\noperators and/or algorithms, which present some clear overlap with this project.\n\nA (possibly not exhaustive) list of other projects is:\n\n* http://proximity-operator.net\n* https://github.com/ganguli-lab/proxalgs\n* https://github.com/pmelchior/proxmin\n* https://github.com/comp-imaging/ProxImaL\n* https://github.com/pyxu-org/pyxu\n\nAll of these projects are self-contained, meaning that they implement both proximal\nand linear operators as needed to solve a variety of problems in different areas\nof science.\n\nThe main difference with PyProximal lies in the fact that we decide *not to* intertangle\nlinear and proximal operators within the same library. We leverage the extensive\nset of linear operators provided by the [PyLops](http://pylops.readthedocs.io)\nproject and focus only on the proximal part of the problem. This makes the codebase\nmore concise, and easier to understand and extend. Moreover many of the\nproblems that are solved in PyLops can now be also solved by means of\nproximal algorithms!\n\n\n## Project structure\nThis repository is organized as follows:\n* **pyproximal**: python library containing various orthogonal projections, proximial operators, and solvers\n* **pytests**:    set of pytests\n* **testdata**:   sample datasets used in pytests and documentation\n* **docs**:       sphinx documentation\n* **examples**:   set of python script examples for each proximal operator to be embedded in documentation using sphinx-gallery\n* **tutorials**:  set of python script tutorials to be embedded in documentation using sphinx-gallery\n\n## Getting started\nYou need **Python 3.10 or greater**.\n\n#### From PyPI\nTo get the most out of PyProximal straight out of the box, we recommend using\nthe PyPI distribution via `uv`:\n\n```bash\nuv pip install pyproximal\n```\n\nor directly via `pip`:\n\n```bash\npip install pyproximal\n```\n\n#### From Conda\nYou can also install PyProximal via `conda`:\n\n```bash\nconda install -c conda-forge pyproximal\n```\n\n#### From Github\nFinally, you can also directly install from the main branch (although this is not recommended) via `uv`:\n\n```bash\nuv add git+https://github.com/PyLops/pyproximal.git --branch main\n```\nor via `pip`:\n```bash\npip install git+https://git@github.com/PyLops/pyproximal.git@main\n```\n\n## Contributing\n*Feel like contributing to the project? Adding new operators or tutorial?*\n\nWe advise using the [Anaconda Python distribution](https://www.anaconda.com/download)\nto ensure that all the dependencies are installed via the `Conda` package manager. Follow\nthe following instructions and read carefully the [CONTRIBUTING](CONTRIBUTING.md)\nfile before getting started.\n\n### 1. Fork and clone the repository\nExecute the following command in your terminal:\n\n```\ngit clone https://github.com/your_name_here/pyproximal.git\n```\n\n### 2. Install PyProximal in a new Conda environment\nTo ensure that further development of PyProximal is performed within the same environment (i.e.,\nsame dependencies) as that defined by ``environment-dev.yml``/``environment-dev-arm.yml`` files,\nwe suggest to work off a new Conda enviroment.\n\nThe first time you clone the repository run the following command:\n```\nmake dev-install_conda\n```\nTo ensure that everything has been setup correctly, run tests:\n```\nmake tests\n```\nMake sure no tests fail, this guarantees that the installation has been successfull.\n\nRemember to always activate the conda environment every time you open a new terminal by typing:\n```\nsource activate pyproximal\n```\n\nIf you prefer to use ``uv``, checkout the [Contributing](https://pyproximal.readthedocs.io/en/latest/contributing.html) page in the official documentation.\n\n\n## Documentation\nThe official documentation of PyProximal is available [here](https://pyproximal.readthedocs.io/).\n\n\nMoreover, if you have installed PyProximal using the *developer environment*\nyou can also build the documentation locally by typing the following command:\n```\nmake doc\n```\nOnce the documentation is created, you can make any change to the source code and rebuild the documentation by\nsimply typing\n```\nmake docupdate\n```\nNote that if a new example or tutorial is created (and if any change is made to a previously available example or tutorial)\nyou are required to rebuild the entire documentation before your changes will be visible.\n\n## Citing\nWhen using PyProximal in scientific publications, please cite the following paper:\n\n- Ravasi M, Örnhag M. V., Luiken N., Leblanc O. and Uruñuela E., 2024, *\u003cb\u003ePyProximal - scalable convex optimization in Python\u003c/b\u003e*,\n  Journal of Open Source Software, 9(95), 6326. doi: 10.21105/joss.06326 [(link)](https://joss.theoj.org/papers/10.21105/joss.06326)\n\n## Contributors\n* Matteo Ravasi, mrava87\n* Nick Luiken, NickLuiken\n* Eneko Uruñuela, eurunuela\n* Marcus Valtonen Örnhag, marcusvaltonen\n* Olivier Leblanc, olivierleblanc\n* Toru Tamaki, tttamaki\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpylops%2Fpyproximal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpylops%2Fpyproximal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpylops%2Fpyproximal/lists"}