PyLops/pylops

PyLops – A Linear-Operator Library for Python

What it solves

Many algorithms in signal processing, image processing, and remote sensing rely on linear operators and inverse problems. For small problems, you can use explicit matrices with NumPy and SciPy. But large-scale problems often have matrices that are too big to store. PyLops solves this by representing linear operators as functions that describe matrix-vector products, which is all iterative solvers need.

How it works

Instead of storing an array of numbers, PyLops wraps a function (like a stencil summation for a derivative) into an operator object. This object defines both the forward mode (Dx) and the transpose mode (Dᵀy). It also provides solvers (like least-squares) that work with these functional operators. The example shows the FirstDerivative operator: D_op @ x computes the derivative, and D_op / y performs least-squares inversion to recover the original signal.

Who it’s for

Developers and researchers working in signal processing, image processing, remote sensing, and large-scale optimization who need to solve inverse problems without explicitly building huge matrices. It's for Python users familiar with NumPy/SciPy who want a more scalable and expressive way to handle linear algebra.

Highlights

  • Matrix-free: represents operators as functions, not arrays, enabling work on problems too large for explicit matrices.
  • Backend-agnostic and idiomatic Python library.
  • Includes many ready-made operators (derivatives, convolutions, FFTs) and solvers (least-squares, sparse inversion).
  • Lets you define your own operators that interface seamlessly with the ecosystem.
  • Inspired by the MATLAB Spot toolbox.
  • Initially written by Equinor and now a NUMFOCUS Affiliated Project.
  • Provides performance benchmarks and video tutorials.

Related

  • Project
  • Project
  • Project
  • Project
  • Project