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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pfapack-1.1.1.tar.gz (176.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pfapack-1.1.1-cp313-cp313-win_amd64.whl (16.9 MB view details)

Uploaded CPython 3.13Windows x86-64

pfapack-1.1.1-cp313-cp313-manylinux_2_28_x86_64.whl (12.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

pfapack-1.1.1-cp313-cp313-macosx_15_0_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.13macOS 15.0+ x86-64

pfapack-1.1.1-cp313-cp313-macosx_14_0_arm64.whl (867.8 kB view details)

Uploaded CPython 3.13macOS 14.0+ ARM64

pfapack-1.1.1-cp312-cp312-win_amd64.whl (16.9 MB view details)

Uploaded CPython 3.12Windows x86-64

pfapack-1.1.1-cp312-cp312-manylinux_2_28_x86_64.whl (12.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

pfapack-1.1.1-cp312-cp312-macosx_15_0_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.12macOS 15.0+ x86-64

pfapack-1.1.1-cp312-cp312-macosx_14_0_arm64.whl (867.8 kB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

pfapack-1.1.1-cp311-cp311-win_amd64.whl (16.9 MB view details)

Uploaded CPython 3.11Windows x86-64

pfapack-1.1.1-cp311-cp311-manylinux_2_28_x86_64.whl (12.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

pfapack-1.1.1-cp311-cp311-macosx_15_0_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.11macOS 15.0+ x86-64

pfapack-1.1.1-cp311-cp311-macosx_14_0_arm64.whl (867.8 kB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

pfapack-1.1.1-cp310-cp310-win_amd64.whl (16.9 MB view details)

Uploaded CPython 3.10Windows x86-64

pfapack-1.1.1-cp310-cp310-manylinux_2_28_x86_64.whl (12.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

pfapack-1.1.1-cp310-cp310-macosx_15_0_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.10macOS 15.0+ x86-64

pfapack-1.1.1-cp310-cp310-macosx_14_0_arm64.whl (867.8 kB view details)

Uploaded CPython 3.10macOS 14.0+ ARM64

File details

Details for the file pfapack-1.1.1.tar.gz.

File metadata

  • Download URL: pfapack-1.1.1.tar.gz
  • Upload date:
  • Size: 176.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pfapack-1.1.1.tar.gz
Algorithm Hash digest
SHA256 6d86fca2de8ec6638eed2c89710434c3140f559690f63ac77c18b3fc1506e0b8
MD5 46d1ba14c539f55b522e47a43158e9c6
BLAKE2b-256 3eae2543e5bc1e649ea75f5abb769fba346edf32acae45fd69c8e223233689c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for pfapack-1.1.1.tar.gz:

Publisher: build_wheels.yml on basnijholt/pfapack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pfapack-1.1.1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: pfapack-1.1.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 16.9 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pfapack-1.1.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 5936bddcc013efea5780b7fcae4ea50c7469407bbb1891ccde5e9f5394bfcb10
MD5 9cae21c44702e3c82e024858a0c88bc1
BLAKE2b-256 142dd1e9d3107d0a7cdef57363cd5bb93ec929236e2ebc25e4f2d15eaf81ed48

See more details on using hashes here.

Provenance

The following attestation bundles were made for pfapack-1.1.1-cp313-cp313-win_amd64.whl:

Publisher: build_wheels.yml on basnijholt/pfapack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pfapack-1.1.1-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pfapack-1.1.1-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8a41fe98f75acab75928321b0b0a9d7b9c0a42b9ef06d0da19bba77ee7a97fed
MD5 d090b2836dff9464d155d37dca83103f
BLAKE2b-256 76db3166904c11364e464e4bc2752f251b85ae1b852cc5e844b817fc6d42ab01

See more details on using hashes here.

Provenance

The following attestation bundles were made for pfapack-1.1.1-cp313-cp313-manylinux_2_28_x86_64.whl:

Publisher: build_wheels.yml on basnijholt/pfapack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pfapack-1.1.1-cp313-cp313-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for pfapack-1.1.1-cp313-cp313-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 4b4cb02a42c1dedfb0c2ebc815b6c6c1b4cca867ace8d507191cad7d930ccddd
MD5 daeb88e9885d87be3eb8f08b2d95634e
BLAKE2b-256 083190951e816dd4ed1d3857d5484ea16ddebf713fe439302c86a93a70c7b098

See more details on using hashes here.

Provenance

The following attestation bundles were made for pfapack-1.1.1-cp313-cp313-macosx_15_0_x86_64.whl:

Publisher: build_wheels.yml on basnijholt/pfapack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pfapack-1.1.1-cp313-cp313-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for pfapack-1.1.1-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 b5d83282ac7f849ef0f4b5685e40276ecf8e5597511c38e1c584b53cb09abc06
MD5 a7a143a831166118935da823a48e4e37
BLAKE2b-256 43db569113a67552cf99fa1c3256dc8106e33df24e5a89a992602ba95266d3e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for pfapack-1.1.1-cp313-cp313-macosx_14_0_arm64.whl:

Publisher: build_wheels.yml on basnijholt/pfapack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pfapack-1.1.1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: pfapack-1.1.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 16.9 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pfapack-1.1.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 dab1848ce78bb836e6f08fbcb99d93ac4d0a6d11926f24315696cd9255bc8daa
MD5 32194b4a53bc31df896a9859291d598f
BLAKE2b-256 bfabf9d551647731554bac6790dfacdf2605f731db0135cd39771a27c111bce7

See more details on using hashes here.

Provenance

The following attestation bundles were made for pfapack-1.1.1-cp312-cp312-win_amd64.whl:

Publisher: build_wheels.yml on basnijholt/pfapack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pfapack-1.1.1-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pfapack-1.1.1-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 86097b03fb6f7199be792562822788bb95fd402601bb43ff73294637a4a700c9
MD5 304110013f5833cb56f40027dbd42a15
BLAKE2b-256 3ace42254bfaeb0e2f022cbe1a5623da4b7b44a1a8172201cc110e0ac1b925af

See more details on using hashes here.

Provenance

The following attestation bundles were made for pfapack-1.1.1-cp312-cp312-manylinux_2_28_x86_64.whl:

Publisher: build_wheels.yml on basnijholt/pfapack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pfapack-1.1.1-cp312-cp312-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for pfapack-1.1.1-cp312-cp312-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 862039cfe586986a9faaab06a894a626abb5e523c67b7f4da9cd42ffa1f00a3e
MD5 0ba5981c6b10b629798fc7cff885a5dd
BLAKE2b-256 090ab30b714020995054a843eecf9198fb6ec8cae4c1833c69ad58b8a93d023a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pfapack-1.1.1-cp312-cp312-macosx_15_0_x86_64.whl:

Publisher: build_wheels.yml on basnijholt/pfapack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pfapack-1.1.1-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for pfapack-1.1.1-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 c651916deddf36fbadcbb8c56b9b5164425469320c5e218ca554c1f619b59341
MD5 2f347e75846347c82789a80057004017
BLAKE2b-256 b40711776718b7888324a481a2b574c944b90c3ee7cac98f7be2f3c0a407fc16

See more details on using hashes here.

Provenance

The following attestation bundles were made for pfapack-1.1.1-cp312-cp312-macosx_14_0_arm64.whl:

Publisher: build_wheels.yml on basnijholt/pfapack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pfapack-1.1.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: pfapack-1.1.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 16.9 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pfapack-1.1.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9674283ec4e7a1ecf74580febdf97a38f15ed8679a66386c3d35d614ea506008
MD5 570be6a9b337e9c8d5fb950f945dd267
BLAKE2b-256 657e6dd26a8d639dfdc0d9e86fece321678cb875b2ade0b1ad3fd378cb776e26

See more details on using hashes here.

Provenance

The following attestation bundles were made for pfapack-1.1.1-cp311-cp311-win_amd64.whl:

Publisher: build_wheels.yml on basnijholt/pfapack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pfapack-1.1.1-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pfapack-1.1.1-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5b99d48289ec57bbe9cb3c529f1a5f601df2b38b1a07084ab4b516d758625f2f
MD5 11980a9defec8cc2af1d4593664076ee
BLAKE2b-256 d4d49d03f2ba88c5584f3cadaeb177c486e5a09444b82a88d95af93136eeae55

See more details on using hashes here.

Provenance

The following attestation bundles were made for pfapack-1.1.1-cp311-cp311-manylinux_2_28_x86_64.whl:

Publisher: build_wheels.yml on basnijholt/pfapack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pfapack-1.1.1-cp311-cp311-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for pfapack-1.1.1-cp311-cp311-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 54d97cc81cc78c90d3b87a1995fff0820e60067ed7067d69bff4c1412a65f402
MD5 5b8594c874020292f688ff7300ea90cb
BLAKE2b-256 e29b75332a84a075a6664d90ff9a2234c83178b2b030c3c1fb3c4ab3d7acb560

See more details on using hashes here.

Provenance

The following attestation bundles were made for pfapack-1.1.1-cp311-cp311-macosx_15_0_x86_64.whl:

Publisher: build_wheels.yml on basnijholt/pfapack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pfapack-1.1.1-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for pfapack-1.1.1-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 3a98b016d1441ffb345e31dfe8e598cb510a7089f6f4c8d2a996484d7e1bd4ba
MD5 dcae1c50008702740e2a1ddfe8f82a71
BLAKE2b-256 be53812ce2eafad3d359af63e2c5a1f12c33c228a1bbcd9cca9dd95ac96afc51

See more details on using hashes here.

Provenance

The following attestation bundles were made for pfapack-1.1.1-cp311-cp311-macosx_14_0_arm64.whl:

Publisher: build_wheels.yml on basnijholt/pfapack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pfapack-1.1.1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: pfapack-1.1.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 16.9 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pfapack-1.1.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 0595453ff86c11742973498da6b2387d98e050dd079a1fdc101832ab41b8871a
MD5 ec76dd68ee28a84708493a6a0e4aa50b
BLAKE2b-256 6f6695e46e8b703df8915c6f3aa83d523c01470f8e8d08278f6904b0acb92547

See more details on using hashes here.

Provenance

The following attestation bundles were made for pfapack-1.1.1-cp310-cp310-win_amd64.whl:

Publisher: build_wheels.yml on basnijholt/pfapack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pfapack-1.1.1-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pfapack-1.1.1-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cf5bd92e0cf6fe969596bb4d5b77b83241b22751773c5043fccea0897dc5392f
MD5 b15c57d36404efff993640eb08dc1af6
BLAKE2b-256 d91e3a93074e7f4c0d836dd001e18de2ac46f247238b1c99ded95ecbe5cc6e65

See more details on using hashes here.

Provenance

The following attestation bundles were made for pfapack-1.1.1-cp310-cp310-manylinux_2_28_x86_64.whl:

Publisher: build_wheels.yml on basnijholt/pfapack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pfapack-1.1.1-cp310-cp310-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for pfapack-1.1.1-cp310-cp310-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 d883db6ddde391a17aa869ee069ae8a87d02569ab29d46828bf8b6ca04879c1a
MD5 49c696acfe990c2c5b1ce47882be6a3d
BLAKE2b-256 23b9621e03994940fb2fda3da245fdf8f4f1cb1e156b8e8592740dfb7a04bf27

See more details on using hashes here.

Provenance

The following attestation bundles were made for pfapack-1.1.1-cp310-cp310-macosx_15_0_x86_64.whl:

Publisher: build_wheels.yml on basnijholt/pfapack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pfapack-1.1.1-cp310-cp310-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for pfapack-1.1.1-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 e9a8ba6bd8aac3390be2419d3a57c08057105af0e6c880670396a0fbc718f5a8
MD5 4d61f3f9e17edf01ac2b2c1b6e17c09d
BLAKE2b-256 56205bec35eb1dd0cd67014889fec59f088bb4545cec238b60056f90c03c2e3a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pfapack-1.1.1-cp310-cp310-macosx_14_0_arm64.whl:

Publisher: build_wheels.yml on basnijholt/pfapack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.1.1 This release

17 files

1.1.0

17 files

1.0.2

17 files

1.0.1

21 files

1.0.0

21 files

0.3.1

2 files

0.3.0

2 files

0.2.1

2 files

0.2.0

2 files

0.1.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page