skillfed

qdldl

QDLDL, a free LDL factorization routine.

qdldl v0.1.9.post1 2.0M downloads/30d#3,407 on PyPI18
Permissive license Apache 2.0 Active released

What it is and what it does

QDLDL is a Python binding to a specialized linear algebra routine that factors quasi-definite matrices using LDL decomposition. It takes sparse matrices in scipy's CSC format and computes a factorization that can be reused to solve multiple linear systems efficiently. The package is designed for problems where the matrix structure is sparse and quasi-definite (a generalization of symmetric indefinite matrices), which arise in optimization, control theory, and other numerical applications.

The solver provides two main operations: initial factorization via the Solver constructor, and subsequent solves via the solve() method. It also supports updating the factorization when the matrix values change but the sparsity pattern remains fixed, which is useful for iterative algorithms. The implementation handles format conversions internally (e.g., converting to upper triangular form) and depends on numpy and scipy for matrix representation and numerical operations.

Use it for:

  • Solve multiple linear systems with the same quasi-definite matrix by factorizing once and reusing the factorization.
  • Implement interior-point optimization algorithms that require repeated solves with slowly-changing sparse matrices.
  • Perform LDL decomposition of indefinite symmetric matrices in control theory or signal processing applications.
  • Update factorizations in iterative solvers without recomputing from scratch when only matrix values change.
  • Integrate specialized sparse linear algebra into larger numerical pipelines that use scipy.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides a Python interface to QDLDL, a free LDL factorization routine for solving linear systems with quasi-definite matrices in sparse format.

Yes, if you need to solve linear systems with quasi-definite sparse matrices and want a specialized, actively-maintained solver. The medium install friction is typical for compiled numerical packages. Apache 2.0 licensing poses no restrictions. No known security vulnerabilities. Best suited for optimization and numerical computing workflows; not needed for general-purpose linear algebra.

Install

qdldl on PyPI

pip

pip install qdldl

uv

uv add qdldl

poetry

poetry add qdldl

Installing qdldl

Before you install

Medium install friction due to compiled wheels for multiple Python versions and platforms (cp310 through cp313, macOS, Linux, Windows). Actively maintained with a recent release (176 days ago) and ongoing repository activity.

License in practice

Licensed under Apache 2.0, a permissive open-source license that allows commercial and private use with minimal restrictions.

Quickstart

pip install qdldl

import qdldl
import scipy.sparse

A = scipy.sparse.csc_matrix([[2, 1], [1, 2]])
F = qdldl.Solver(A)
x = F.solve(b)

Input matrix A must be square and quasi-definite; scipy sparse CSC format is required (or CSR for updates).

Verify before relying

  • Performance characteristics and scalability limits for large sparse systems are not documented in the fact sheet.
  • Numerical stability guarantees or error bounds for the factorization are not specified.
  • Whether the package is actively used in production systems or primarily academic/research contexts.

Package facts

License Apache 2.0 (permissive)
Python support not specified
Install friction medium — platform-specific wheel
Runtime dependencies 2 — numpy, scipy
Maintenance actively maintained — 176 days since the last release
Last repo commit
First released
Downloads 1,962,872/month — #3,407 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: qdldl-0.1.9.post1-cp310-cp310-macosx_10_9_x86_64.whl; qdldl-0.1.9.post1-cp310-cp310-macosx_11_0_arm64.whl; qdldl-0.1.9.post1-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; qdldl-0.1.9.post1-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; qdldl-0.1.9.post1-cp310-cp310-win_amd64.whl; qdldl-0.1.9.post1-cp311-cp311-macosx_10_9_x86_64.whl; qdldl-0.1.9.post1-cp311-cp311-macosx_11_0_arm64.whl; qdldl-0.1.9.post1-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; qdldl-0.1.9.post1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; qdldl-0.1.9.post1-cp311-cp311-win_amd64.whl; qdldl-0.1.9.post1-cp311-cp311-win_arm64.whl; qdldl-0.1.9.post1-cp312-cp312-macosx_10_13_x86_64.whl; qdldl-0.1.9.post1-cp312-cp312-macosx_11_0_arm64.whl; qdldl-0.1.9.post1-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; qdldl-0.1.9.post1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; qdldl-0.1.9.post1-cp312-cp312-win_amd64.whl; qdldl-0.1.9.post1-cp312-cp312-win_arm64.whl; qdldl-0.1.9.post1-cp313-cp313-macosx_10_13_x86_64.whl; qdldl-0.1.9.post1-cp313-cp313-macosx_11_0_arm64.whl; qdldl-0.1.9.post1-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl

Tags

LDL factorizationquasi-definite matrix solversparse linear system solvermatrix factorization pythonQDLDL python interfacesparse matrix decompositionlinear algebra factorization
sparse-linear-algebramatrix-factorizationnumerical-computing

More Mathematics packages