$npx skillfedfor your agent

linear-operator

A linear operator implementation, primarily designed for finite-dimensional positive definite operators (i.e. kernel matrices).

With conditionsPyPI MathematicsReleased Feb 20261.1M downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — linear_operator-0.6.1-py3-none-any.whl
v0.6.1 · released 2026-02-27 · Python >=3.10 · 2 runtime deps: torch, scipy

Yes, if you work with large structured matrices in PyTorch and need memory efficiency or computational speed. The low install friction and active maintenance support adoption. However, the pre-alpha status and incomplete feature set (symmetric, generic square, rectangular, and sparse operators not yet implemented) mean you should verify that positive semi-definite and triangular operators cover your use case and accept that the API may change.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python >= 3.10 and torch installed.
  • Low friction install with only torch and scipy as runtime dependencies.
  • Active maintenance with recent releases; currently in pre-alpha (Development Status :: 2 - Pre-Alpha), so expect API changes and incomplete feature coverage.

License · maintenance · safety

MIT (permissive) — MIT license permits unrestricted use, modification, and distribution with minimal obligations—suitable for both open and proprietary projects.

last release 2026-02-27 (168 days) · last repo commit 2026-06-14 · 126 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,139,454 downloads/mo, #4,309 on PyPI

Verify before relying

pip install linear_operator

from linear_operator.operators import DiagLinearOperator, LowRankRootLinearOperator
import torch

C = torch.randn(1000, 20)
d = torch.randn(1000)
b = torch.randn(1000)
A = LowRankRootLinearOperator(C) + DiagLinearOperator(d)
result = torch.linalg.solve(A, b)
  • Whether positive semi-definite and triangular operators cover your specific matrix structure needs, given the package's stated beta limitations
  • Performance gains on your hardware and matrix sizes relative to dense PyTorch operations
  • Stability of the API given pre-alpha status and the incomplete roadmap (symmetric, generic square, rectangular, and sparse operators still pending)
Same gist for agents: .md · .json

What it is and what it does

LinearOperator is a PyTorch package that lets you define and work with structured matrices—such as low-rank-plus-diagonal or triangular matrices—without explicitly constructing them as dense tensors. Instead of materializing a large matrix in memory, you define it compositionally (e.g., `LowRankRootLinearOperator(C) + DiagLinearOperator(d)`) and LinearOperator automatically routes operations like solves and matrix-vector products through efficient structure-exploiting routines. It depends on torch and scipy and integrates with PyTorch's standard linear algebra API.

The package is currently in beta and supports positive semi-definite and triangular matrices. Its main value is enabling memory-efficient and computationally efficient workflows for large structured matrices—particularly useful in probabilistic modeling and kernel methods—without requiring you to hand-code specialized linear algebra routines. Operations like `torch.linalg.solve(A, b)` work transparently on LinearOperator objects, dispatching to the best available algorithm based on the matrix's declared structure.

Use it for

  • Sampling from high-dimensional multivariate Gaussians with structured covariance matrices without materializing the full matrix.
  • Solving linear systems with low-rank-plus-diagonal structure efficiently via the Woodbury formula.
  • Kernel matrix operations in Gaussian process inference where the kernel matrix is too large to fit in memory.
  • Composing multiple structured matrix types and automatically leveraging efficient algorithms for the resulting composite structure.
  • Prototyping different structured matrix approximations for a model without rewriting linear algebra code for each variant.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you work with large structured matrices in PyTorch and need memory efficiency or computational speed.

The low install friction and active maintenance support adoption. However, the pre-alpha status and incomplete feature set (symmetric, generic square, rectangular, and sparse operators not yet implemented) mean you should verify that positive semi-definite and triangular operators cover your use case and accept that the API may change.

Install

linear-operator on PyPI

Before you install

Low friction install with only torch and scipy as runtime dependencies. Active maintenance with recent releases; currently in pre-alpha (Development Status :: 2 - Pre-Alpha), so expect API changes and incomplete feature coverage.

Requires Python >= 3.10 and torch installed.

License in practice

MIT license permits unrestricted use, modification, and distribution with minimal obligations—suitable for both open and proprietary projects.

Quickstart

pip install linear_operator

from linear_operator.operators import DiagLinearOperator, LowRankRootLinearOperator
import torch

C = torch.randn(1000, 20)
d = torch.randn(1000)
b = torch.randn(1000)
A = LowRankRootLinearOperator(C) + DiagLinearOperator(d)
result = torch.linalg.solve(A, b)

Verify before relying

  • Whether positive semi-definite and triangular operators cover your specific matrix structure needs, given the package's stated beta limitations
  • Performance gains on your hardware and matrix sizes relative to dense PyTorch operations
  • Stability of the API given pre-alpha status and the incomplete roadmap (symmetric, generic square, rectangular, and sparse operators still pending)

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
torchscipy
MaintenanceActively maintained 168 days since the last release
Last repo commit
First released
Downloads1,139,454 / month, #4,309 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 2 - Pre-AlphaProgramming Language :: Python :: 3

Evidence: linear_operator-0.6.1-py3-none-any.whl

Tags

Capabilities
structured matrix operations pytorchefficient linear algebra pytorchlow-rank matrix computationkernel matrix operationsmatrix-free linear algebradiagonal plus low-rank solve
Topics
matrix-free-computationkernel-methodsgaussian-processes

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “structured matrix operations pytorch”

  • linear-operatorLinearOperator abstracts structured matrix operations in PyTorch,…
  • torch-complexProvides a Python class wrapping real and imaginary PyTorch tensors…
  • gram-newton-schulzImplements a hardware-aware Gram Newton-Schulz algorithm for polar…

Give your agent the search over MCP, or paste the wish link into any chat.

More Mathematics packages

networkx Worth it
PyPI · Python Modules · released Dec 2025

NetworkX provides data structures and algorithms for creating, analyzing, and manipulating graphs and networks, supporting everything from simple undirected graphs to complex directed and weighted networks.

BSD-3-Clausepure Python
290.9Mdownloads / mo
kiwisolver Worth it
PyPI · Mathematics · released Mar 2026

kiwisolver is a Python binding to a fast C++ implementation of the Cassowary constraint solver, enabling you to solve systems of linear constraints and inequalities.

Install it if you need to solve constraint systems; skip it if you only need simple linear algebra.

BSD-3-Clausecompiled wheel · 3.10+
205.5Mdownloads / mo
sympy Worth it
PyPI · Scientific/Engineering · released Apr 2025

SymPy is a Python library for symbolic mathematics, performing algebraic manipulation, calculus, equation solving, and mathematical expression simplification without numerical approximation.

BSD-3-Clausepure Python · 3.9+
196.4Mdownloads / mo
contourpy Worth it
PyPI · Information Analysis · released Jul 2025

ContourPy calculates contours of 2D quadrilateral grids using C++11 algorithms wrapped in Python, offering serial and multithreaded implementations without requiring Matplotlib as a dependency.

BSD-3-Clausecompiled wheel · 3.11+
191.2Mdownloads / mo
torch With conditions
PyPI · Software Development · released Jul 2026

PyTorch provides GPU-accelerated tensor computation and automatic differentiation for building and training deep neural networks in Python.

Apache-2.0 AND Apache-2.0 WITH LLVM-exception AND BSD-2-Clause AND BSD-3-Clause AND BSL-1.0 AND MITcompiled wheel · 3.10+
102.5Mdownloads / mo
onnxruntime Worth it
PyPI · Software Development · released Jul 2026

onnxruntime loads and executes Open Neural Network Exchange (ONNX) models with a focus on inference performance across CPUs and accelerators.

Install it if you have ONNX models to run in production or development.

MITcompiled wheel · 3.11+
89.3Mdownloads / mo

See also nvidia-cusolver · blis · nvidia-cusolver-cu12 · lineax · eigenpy · nvidia-cublas · nvidia-cublas-cu12 · xarray-einstats · scikit-fem · tabmat