Skip to main content

pyspqr: Simple Python Wrapper for SuiteSparseQR

import scipy as sp
from pyspqr import qr

A = sp.sparse.random(1000, 1000, format='csc')

Q, R, E = qr(A)

Where Q is an orthogonal linear operator represented by Householder reflections plus a permutation, R is a sparse upper triangular matrix, and E is a permutation linear operator. They are used as follows:

import numpy as np
from scipy.sparse.linalg import spsolve, spsolve_triangular

x = np.random.randn(1000)

assert np.allclose(Q @ (R @ (E @ x)), A @ x)

assert np.allclose(
    E.T @ spsolve_triangular(R, Q.T @ x, lower=False),
    spsolve(A, x)
    )

We are working on offering an easy interface when the input matrix is not square and/or not full rank, and the user is interested in a least-squares or minimum-norm solution. (It’s already doable also in those cases with the current outputs, but it’s not too user-friendly.)

Installation

pip install pyspqr

We publish compiled wheels in PyPI for all the major platforms, including Windows and ARM64 Linux. See here for all platforms and architectures available. They “just work”.

We use ABI3 reduced Python3 API and the newer Numpy2 ABI, so the wheels run on any Python greater or equal than 3.6, both with Numpy 1 and 2.

Wheels ship bundled with the latest version of SuiteSparse, compiled in CI/CD by this repository, and also include an optimized multi-threaded OpenBLAS, which is used by SuiteSparse for supernodal operations.

Metadata

Release files for pyspqr 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyspqr 0.2.0
File Size Uploaded Provenance
pyspqr-0.2.0.tar.gz 26.4 kB With provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for pyspqr 0.2.0
File
pyspqr-0.2.0-cp36-abi3-win_amd64.whl CPython 3.6 abi3 Windows x86-64 Details
pyspqr-0.2.0-cp36-abi3-musllinux_1_2_x86_64.whl CPython 3.6 abi3 Linux musl 1.2+ x86-64 Details
pyspqr-0.2.0-cp36-abi3-manylinux_2_28_aarch64.whl CPython 3.6 abi3 Linux glibc 2.28+ ARM64 Details
pyspqr-0.2.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.6 abi3 Linux glibc 2.17+ x86-64 Details
pyspqr-0.2.0-cp36-abi3-macosx_14_0_arm64.whl CPython 3.6 abi3 macOS 14.0+ ARM64 Details
pyspqr-0.2.0-cp36-abi3-macosx_11_0_arm64.whl CPython 3.6 abi3 macOS 11.0+ ARM64 Details
pyspqr-0.2.0-cp36-abi3-macosx_10_9_x86_64.whl CPython 3.6 abi3 macOS 10.9+ x86-64 Details

Total release size: 44.4 MB

Release files / pyspqr-0.2.0.tar.gz

Download URL pyspqr-0.2.0.tar.gz
Size 26.4 kB
Tags Source
SHA-256 checksum
How to use checksums
4a181aa3a38f7c02e2a1be3a798a9f84c547c381abdb2bec82bbc739d4410728
BLAKE2b-256 checksum
How to use checksums
86843b5666bee73d0e14afc6b61c01f01cbc44eb360010e047a46eb4a74106b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2024.

Transparency log

Release files / pyspqr-0.2.0-cp36-abi3-win_amd64.whl

Download URL pyspqr-0.2.0-cp36-abi3-win_amd64.whl
Size 8.9 MB
Tags CPython 3.6 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
9491833d50250549e5f2a9c013b784da55358bd520eeef778849673afd51c374
BLAKE2b-256 checksum
How to use checksums
3d0a7f195801588a9fd05a6242e0b5132cb30e7f5c68af240f7d16e6c60d994f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2024.

Transparency log

Release files / pyspqr-0.2.0-cp36-abi3-musllinux_1_2_x86_64.whl

Download URL pyspqr-0.2.0-cp36-abi3-musllinux_1_2_x86_64.whl
Size 13.0 MB
Tags CPython 3.6 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
1b941f98299eb508910720a0a5785e71e3ee03295764953b73700555c5ec1496
BLAKE2b-256 checksum
How to use checksums
4acb0ed2ea598d1057e67bcd90193a1a21250c5e9b83555952f7824d383ca906
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2024.

Transparency log

Release files / pyspqr-0.2.0-cp36-abi3-manylinux_2_28_aarch64.whl

Download URL pyspqr-0.2.0-cp36-abi3-manylinux_2_28_aarch64.whl
Size 6.2 MB
Tags CPython 3.6 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
12f7c01e7fdfde8a99ab57ea8026c56b0ab2f1c967980f3d972adb2ba39dce00
BLAKE2b-256 checksum
How to use checksums
a1b660f36fd959c1da1cc6963a0013050fbcaf0cbd4cd430dccd985b5fc6b343
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2024.

Transparency log

Release files / pyspqr-0.2.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pyspqr-0.2.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 12.5 MB
Tags CPython 3.6 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
73d05e5f63e5293d998ec18e54eca357b102528d827d50ccae217f2bb83f30d7
BLAKE2b-256 checksum
How to use checksums
005247bce69423ef8e6bce11d6d719ce7ae4110d6c126572a11dd59ff8f6c754
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2024.

Transparency log

Release files / pyspqr-0.2.0-cp36-abi3-macosx_14_0_arm64.whl

Download URL pyspqr-0.2.0-cp36-abi3-macosx_14_0_arm64.whl
Size 1.3 MB
Tags CPython 3.6 abi3 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
6944c41e8431c4dee8cb41636928383dddb153f7ffd5dcd3fccbf72dda86fca6
BLAKE2b-256 checksum
How to use checksums
c8532ffb8ee7f0b297f20ad8a3c62a0818824722905fd81e2ab7c26cf6aeba23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2024.

Transparency log

Release files / pyspqr-0.2.0-cp36-abi3-macosx_11_0_arm64.whl

Download URL pyspqr-0.2.0-cp36-abi3-macosx_11_0_arm64.whl
Size 1.0 MB
Tags CPython 3.6 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
7232c7993e139aa9c86f96c14dfdfaf0e260c71196a34d7c24ec0d13df72f88c
BLAKE2b-256 checksum
How to use checksums
628f68f246c3c39e671dca9aebb5241c4fb98972d98f271240fefd1f9d3bf106
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2024.

Transparency log

Release files / pyspqr-0.2.0-cp36-abi3-macosx_10_9_x86_64.whl

Download URL pyspqr-0.2.0-cp36-abi3-macosx_10_9_x86_64.whl
Size 1.4 MB
Tags CPython 3.6 abi3 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
66a39076aaa3826059e89ed9e8d2e9c3d2d015df9ac46b9d83f79002fd432c2a
BLAKE2b-256 checksum
How to use checksums
49b68fc5ff40984132e97478da6ada1d3c807906661b3f9637d4972c17fb40d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2024.

Transparency log

Security for pyspqr 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 8 files in this release have been uploaded with provenance metadata.

Select from 8 files

Attestation for pyspqr-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2024.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page