Skip to main content

pfapack: Efficient numerical computation of the Pfaffian for dense and banded skew-symmetric matrices

Code and algorithms are taken from arXiv:1102.3440 which is authored by Michael Wimmer.

pytest codecov docs version PyPI - Python Version Ruff

Install

pip install pfapack

Or using conda:

conda install -c conda-forge pfapack

Usage

from pfapack import pfaffian as pf
import numpy.random

A = numpy.random.rand(100, 100)
A = A - A.T
pfa1 = pf.pfaffian(A)
pfa2 = pf.pfaffian(A, method="H")
pfa3 = pf.pfaffian_schur(A)
print(pfa1, pfa2, pfa3)

The package includes optimized C/FORTRAN implementations that can be used for better performance:

from pfapack.ctypes import pfaffian as cpf
pfa1 = cpf(A)
pfa2 = cpf(A, method="H")
print(pfa1, pfa2)

[!NOTE] Building from source on Windows (only needed if no wheel is available for your platform) requires MSYS2 with the MinGW64 toolchain (mingw-w64-x86_64-gcc-fortran, mingw-w64-x86_64-openblas, and mingw-w64-x86_64-pkgconf).

Citing

If you have used pfapack in your research, please cite it using the following bib entry:

@article{wimmer2012algorithm,
    title={Efficient numerical computation of the pfaffian for dense and banded skew-symmetric matrices},
    author={Michael Wimmer},
    journal={ACM Transactions on Mathematical Software (TOMS)},
    volume={38},
    number={4},
    pages={1--17},
    year={2012},
    publisher={ACM New York, NY, USA}
}

License

MIT License

Contributions

Release files for pfapack 1.1.1

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

Source distribution (sdist)

Source distribution for pfapack 1.1.1
File Size Uploaded
pfapack-1.1.1.tar.gz 176.2 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for pfapack 1.1.1
File
pfapack-1.1.1-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
pfapack-1.1.1-cp313-cp313-manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64 Details
pfapack-1.1.1-cp313-cp313-macosx_15_0_x86_64.whl CPython 3.13 CPython 3.13 macOS 15.0+ x86-64 Details
pfapack-1.1.1-cp313-cp313-macosx_14_0_arm64.whl CPython 3.13 CPython 3.13 macOS 14.0+ ARM64 Details
pfapack-1.1.1-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
pfapack-1.1.1-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details
pfapack-1.1.1-cp312-cp312-macosx_15_0_x86_64.whl CPython 3.12 CPython 3.12 macOS 15.0+ x86-64 Details
pfapack-1.1.1-cp312-cp312-macosx_14_0_arm64.whl CPython 3.12 CPython 3.12 macOS 14.0+ ARM64 Details
pfapack-1.1.1-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
pfapack-1.1.1-cp311-cp311-manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64 Details
pfapack-1.1.1-cp311-cp311-macosx_15_0_x86_64.whl CPython 3.11 CPython 3.11 macOS 15.0+ x86-64 Details
pfapack-1.1.1-cp311-cp311-macosx_14_0_arm64.whl CPython 3.11 CPython 3.11 macOS 14.0+ ARM64 Details
pfapack-1.1.1-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
pfapack-1.1.1-cp310-cp310-manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64 Details
pfapack-1.1.1-cp310-cp310-macosx_15_0_x86_64.whl CPython 3.10 CPython 3.10 macOS 15.0+ x86-64 Details
pfapack-1.1.1-cp310-cp310-macosx_14_0_arm64.whl CPython 3.10 CPython 3.10 macOS 14.0+ ARM64 Details

Total release size: 125.7 MB

Release files / pfapack-1.1.1.tar.gz

Download URL pfapack-1.1.1.tar.gz
Size 176.2 kB
Tags Source
SHA-256 checksum
How to use checksums
6d86fca2de8ec6638eed2c89710434c3140f559690f63ac77c18b3fc1506e0b8
BLAKE2b-256 checksum
How to use checksums
3eae2543e5bc1e649ea75f5abb769fba346edf32acae45fd69c8e223233689c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 10, 2026.

Transparency log

Release files / pfapack-1.1.1-cp313-cp313-win_amd64.whl

Download URL pfapack-1.1.1-cp313-cp313-win_amd64.whl
Size 16.9 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
5936bddcc013efea5780b7fcae4ea50c7469407bbb1891ccde5e9f5394bfcb10
BLAKE2b-256 checksum
How to use checksums
142dd1e9d3107d0a7cdef57363cd5bb93ec929236e2ebc25e4f2d15eaf81ed48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 10, 2026.

Transparency log

Release files / pfapack-1.1.1-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL pfapack-1.1.1-cp313-cp313-manylinux_2_28_x86_64.whl
Size 12.1 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
8a41fe98f75acab75928321b0b0a9d7b9c0a42b9ef06d0da19bba77ee7a97fed
BLAKE2b-256 checksum
How to use checksums
76db3166904c11364e464e4bc2752f251b85ae1b852cc5e844b817fc6d42ab01
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 10, 2026.

Transparency log

Release files / pfapack-1.1.1-cp313-cp313-macosx_15_0_x86_64.whl

Download URL pfapack-1.1.1-cp313-cp313-macosx_15_0_x86_64.whl
Size 1.5 MB
Tags CPython 3.13 macOS 15.0+ x86-64
SHA-256 checksum
How to use checksums
4b4cb02a42c1dedfb0c2ebc815b6c6c1b4cca867ace8d507191cad7d930ccddd
BLAKE2b-256 checksum
How to use checksums
083190951e816dd4ed1d3857d5484ea16ddebf713fe439302c86a93a70c7b098
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 10, 2026.

Transparency log

Release files / pfapack-1.1.1-cp313-cp313-macosx_14_0_arm64.whl

Download URL pfapack-1.1.1-cp313-cp313-macosx_14_0_arm64.whl
Size 867.8 kB
Tags CPython 3.13 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
b5d83282ac7f849ef0f4b5685e40276ecf8e5597511c38e1c584b53cb09abc06
BLAKE2b-256 checksum
How to use checksums
43db569113a67552cf99fa1c3256dc8106e33df24e5a89a992602ba95266d3e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 10, 2026.

Transparency log

Release files / pfapack-1.1.1-cp312-cp312-win_amd64.whl

Download URL pfapack-1.1.1-cp312-cp312-win_amd64.whl
Size 16.9 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
dab1848ce78bb836e6f08fbcb99d93ac4d0a6d11926f24315696cd9255bc8daa
BLAKE2b-256 checksum
How to use checksums
bfabf9d551647731554bac6790dfacdf2605f731db0135cd39771a27c111bce7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 10, 2026.

Transparency log

Release files / pfapack-1.1.1-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL pfapack-1.1.1-cp312-cp312-manylinux_2_28_x86_64.whl
Size 12.1 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
86097b03fb6f7199be792562822788bb95fd402601bb43ff73294637a4a700c9
BLAKE2b-256 checksum
How to use checksums
3ace42254bfaeb0e2f022cbe1a5623da4b7b44a1a8172201cc110e0ac1b925af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 10, 2026.

Transparency log

Release files / pfapack-1.1.1-cp312-cp312-macosx_15_0_x86_64.whl

Download URL pfapack-1.1.1-cp312-cp312-macosx_15_0_x86_64.whl
Size 1.5 MB
Tags CPython 3.12 macOS 15.0+ x86-64
SHA-256 checksum
How to use checksums
862039cfe586986a9faaab06a894a626abb5e523c67b7f4da9cd42ffa1f00a3e
BLAKE2b-256 checksum
How to use checksums
090ab30b714020995054a843eecf9198fb6ec8cae4c1833c69ad58b8a93d023a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 10, 2026.

Transparency log

Release files / pfapack-1.1.1-cp312-cp312-macosx_14_0_arm64.whl

Download URL pfapack-1.1.1-cp312-cp312-macosx_14_0_arm64.whl
Size 867.8 kB
Tags CPython 3.12 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
c651916deddf36fbadcbb8c56b9b5164425469320c5e218ca554c1f619b59341
BLAKE2b-256 checksum
How to use checksums
b40711776718b7888324a481a2b574c944b90c3ee7cac98f7be2f3c0a407fc16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 10, 2026.

Transparency log

Release files / pfapack-1.1.1-cp311-cp311-win_amd64.whl

Download URL pfapack-1.1.1-cp311-cp311-win_amd64.whl
Size 16.9 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
9674283ec4e7a1ecf74580febdf97a38f15ed8679a66386c3d35d614ea506008
BLAKE2b-256 checksum
How to use checksums
657e6dd26a8d639dfdc0d9e86fece321678cb875b2ade0b1ad3fd378cb776e26
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 10, 2026.

Transparency log

Release files / pfapack-1.1.1-cp311-cp311-manylinux_2_28_x86_64.whl

Download URL pfapack-1.1.1-cp311-cp311-manylinux_2_28_x86_64.whl
Size 12.1 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
5b99d48289ec57bbe9cb3c529f1a5f601df2b38b1a07084ab4b516d758625f2f
BLAKE2b-256 checksum
How to use checksums
d4d49d03f2ba88c5584f3cadaeb177c486e5a09444b82a88d95af93136eeae55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 10, 2026.

Transparency log

Release files / pfapack-1.1.1-cp311-cp311-macosx_15_0_x86_64.whl

Download URL pfapack-1.1.1-cp311-cp311-macosx_15_0_x86_64.whl
Size 1.5 MB
Tags CPython 3.11 macOS 15.0+ x86-64
SHA-256 checksum
How to use checksums
54d97cc81cc78c90d3b87a1995fff0820e60067ed7067d69bff4c1412a65f402
BLAKE2b-256 checksum
How to use checksums
e29b75332a84a075a6664d90ff9a2234c83178b2b030c3c1fb3c4ab3d7acb560
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 10, 2026.

Transparency log

Release files / pfapack-1.1.1-cp311-cp311-macosx_14_0_arm64.whl

Download URL pfapack-1.1.1-cp311-cp311-macosx_14_0_arm64.whl
Size 867.8 kB
Tags CPython 3.11 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
3a98b016d1441ffb345e31dfe8e598cb510a7089f6f4c8d2a996484d7e1bd4ba
BLAKE2b-256 checksum
How to use checksums
be53812ce2eafad3d359af63e2c5a1f12c33c228a1bbcd9cca9dd95ac96afc51
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 10, 2026.

Transparency log

Release files / pfapack-1.1.1-cp310-cp310-win_amd64.whl

Download URL pfapack-1.1.1-cp310-cp310-win_amd64.whl
Size 16.9 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
0595453ff86c11742973498da6b2387d98e050dd079a1fdc101832ab41b8871a
BLAKE2b-256 checksum
How to use checksums
6f6695e46e8b703df8915c6f3aa83d523c01470f8e8d08278f6904b0acb92547
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 10, 2026.

Transparency log

Release files / pfapack-1.1.1-cp310-cp310-manylinux_2_28_x86_64.whl

Download URL pfapack-1.1.1-cp310-cp310-manylinux_2_28_x86_64.whl
Size 12.1 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
cf5bd92e0cf6fe969596bb4d5b77b83241b22751773c5043fccea0897dc5392f
BLAKE2b-256 checksum
How to use checksums
d91e3a93074e7f4c0d836dd001e18de2ac46f247238b1c99ded95ecbe5cc6e65
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 10, 2026.

Transparency log

Release files / pfapack-1.1.1-cp310-cp310-macosx_15_0_x86_64.whl

Download URL pfapack-1.1.1-cp310-cp310-macosx_15_0_x86_64.whl
Size 1.5 MB
Tags CPython 3.10 macOS 15.0+ x86-64
SHA-256 checksum
How to use checksums
d883db6ddde391a17aa869ee069ae8a87d02569ab29d46828bf8b6ca04879c1a
BLAKE2b-256 checksum
How to use checksums
23b9621e03994940fb2fda3da245fdf8f4f1cb1e156b8e8592740dfb7a04bf27
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 10, 2026.

Transparency log

Release files / pfapack-1.1.1-cp310-cp310-macosx_14_0_arm64.whl

Download URL pfapack-1.1.1-cp310-cp310-macosx_14_0_arm64.whl
Size 867.8 kB
Tags CPython 3.10 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
e9a8ba6bd8aac3390be2419d3a57c08057105af0e6c880670396a0fbc718f5a8
BLAKE2b-256 checksum
How to use checksums
56205bec35eb1dd0cd67014889fec59f088bb4545cec238b60056f90c03c2e3a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 10, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.1.1 This release

17 release files

1.1.0

17 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

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