Name | lazylinop JSON |
Version |
1.18.2
JSON |
| download |
home_page | None |
Summary | A package dedicated to lazy linear operators based on diverse backends/libraries. |
upload_time | 2025-07-17 12:23:38 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | None |
keywords |
butterfly
lazy computation
signal processing
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
## Lazylinop

[](https://pepy.tech/project/lazylinop)
[](https://pepy.tech/project/lazylinop)
[](https://pypi.org/project/lazylinop/)
A `LazyLinOp` is a high-level linear operator based on an arbitrary underlying implementation, such as:
- custom Python functions,
- a `NumPy array`,
- a `SciPy matrix`,
- a `Faust` object,
- any Python linear operator.
Thanks to the Lazylinop API, this operator can be easily manipulated, transformed or aggregated with other linear operators to form more complex `LazyLinOp` objects.
Thus, many operations are available such as the addition, concatenation, adjoint etc.
These operations are all ruled by the **lazy paradigm**: their evaluation is delayed until the resulting `LazyLinOp` is actually applied to a vector (or to a collection of vectors, seen as a matrix).
## Get started with ``lazylinop``
Run the following command to install the ``lazylinop`` package from PyPI:
```bash
pip install lazylinop
```
Run the following commands to install from conda:
```bash
conda config --add channels conda-forge
conda config --add channels lazylinop
conda install lazylinop
```
## First steps
Build 2D FFT from 1D FFT and Kronecker product:
```python3
from lazylinop.signal import fft
from lazylinop.basicops import kron
fft2d = kron(fft(N), fft(N))
x = np.random.randn(fft2d.shape[1])
y = fft2d @ x
```
Build circular convolution from 1D FFT:
```python3
from lazylinop.signal import fft
from lazylinop.basicops import diag
DFT = fft(N) * np.sqrt(N)
D = diag(DFT @ filter, k=0)
L = (DFT / N).H @ D @ DFT
```
## Authors
- Pascal Carrivain
- Simon Delamare
- Hakim Hadj-Djilani
- Remi Gribonval
## Contribute to ``lazylinop``
You can contribute to ``lazylinop`` with bug report, feature request and merge request.
## Useful links
- Link to the documentation: [Gitlab pages](https://faustgrp.gitlabpages.inria.fr/lazylinop/index.html)
## Running unit tests
```bash
cd tests
python3 -m unittest TestLazyLinOp.py
python3 -m unittest TestSignal.py
```
Raw data
{
"_id": null,
"home_page": null,
"name": "lazylinop",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "butterfly, lazy computation, signal processing",
"author": null,
"author_email": "Inria <remi.gribonval@inria.fr>, Pascal Carrivain <pascal.carrivain@inria.fr>, Simon Delamare <simon.delamare@ens-lyon.fr>, Hakim Hadj-Djilani <hakim.hadj-djilani@inria.fr>, R\u00e9mi Gribonval <remi.gribonval@inria.fr>",
"download_url": null,
"platform": null,
"description": "## Lazylinop\n\n\n[](https://pepy.tech/project/lazylinop)\n[](https://pepy.tech/project/lazylinop)\n[](https://pypi.org/project/lazylinop/)\n\nA `LazyLinOp` is a high-level linear operator based on an arbitrary underlying implementation, such as:\n\n - custom Python functions,\n - a `NumPy array`,\n - a `SciPy matrix`,\n - a `Faust` object,\n - any Python linear operator.\n\nThanks to the Lazylinop API, this operator can be easily manipulated, transformed or aggregated with other linear operators to form more complex `LazyLinOp` objects.\nThus, many operations are available such as the addition, concatenation, adjoint etc.\nThese operations are all ruled by the **lazy paradigm**: their evaluation is delayed until the resulting `LazyLinOp` is actually applied to a vector (or to a collection of vectors, seen as a matrix).\n\n## Get started with ``lazylinop``\n\nRun the following command to install the ``lazylinop`` package from PyPI:\n\n```bash\npip install lazylinop\n```\n\nRun the following commands to install from conda:\n\n```bash\nconda config --add channels conda-forge\nconda config --add channels lazylinop\nconda install lazylinop\n```\n\n## First steps\n\nBuild 2D FFT from 1D FFT and Kronecker product:\n\n```python3\nfrom lazylinop.signal import fft\nfrom lazylinop.basicops import kron\nfft2d = kron(fft(N), fft(N))\nx = np.random.randn(fft2d.shape[1])\ny = fft2d @ x\n```\n\nBuild circular convolution from 1D FFT:\n\n```python3\nfrom lazylinop.signal import fft\nfrom lazylinop.basicops import diag\nDFT = fft(N) * np.sqrt(N)\nD = diag(DFT @ filter, k=0)\nL = (DFT / N).H @ D @ DFT\n```\n\n## Authors\n\n- Pascal Carrivain\n- Simon Delamare\n- Hakim Hadj-Djilani\n- Remi Gribonval\n\n## Contribute to ``lazylinop``\n\nYou can contribute to ``lazylinop`` with bug report, feature request and merge request.\n\n## Useful links\n\n- Link to the documentation: [Gitlab pages](https://faustgrp.gitlabpages.inria.fr/lazylinop/index.html)\n\n## Running unit tests\n\n```bash\n cd tests\n python3 -m unittest TestLazyLinOp.py\n python3 -m unittest TestSignal.py\n```",
"bugtrack_url": null,
"license": null,
"summary": "A package dedicated to lazy linear operators based on diverse backends/libraries.",
"version": "1.18.2",
"project_urls": {
"Bug Tracker": "https://gitlab.inria.fr/faustgrp/lazylinop/-/issues",
"Documentation": "https://faustgrp.gitlabpages.inria.fr/lazylinop/api.html",
"Homepage": "https://faustgrp.gitlabpages.inria.fr/lazylinop/",
"Repository": "https://gitlab.inria.fr/faustgrp/lazylinop"
},
"split_keywords": [
"butterfly",
" lazy computation",
" signal processing"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "e186a65a85f833b1a575ad2277de162f71b8de6f4e2868ec37311d94e7290a1e",
"md5": "a8fcf654158fed7123a9488490eeaa2c",
"sha256": "dcaeddb04fe92844ed112d21b9b8e206fc8c802c76f045cbd636a86fdee82c87"
},
"downloads": -1,
"filename": "lazylinop-1.18.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a8fcf654158fed7123a9488490eeaa2c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 235561,
"upload_time": "2025-07-17T12:23:38",
"upload_time_iso_8601": "2025-07-17T12:23:38.360510Z",
"url": "https://files.pythonhosted.org/packages/e1/86/a65a85f833b1a575ad2277de162f71b8de6f4e2868ec37311d94e7290a1e/lazylinop-1.18.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-17 12:23:38",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "lazylinop"
}