{"id":15253683,"url":"https://github.com/basnijholt/pfapack","last_synced_at":"2025-04-11T14:33:00.001Z","repository":{"id":47474947,"uuid":"244448636","full_name":"basnijholt/pfapack","owner":"basnijholt","description":"Efficient numerical computation of the Pfaffian for dense and banded skew-symmetric matrices","archived":false,"fork":false,"pushed_at":"2025-03-24T22:03:16.000Z","size":272,"stargazers_count":16,"open_issues_count":8,"forks_count":7,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-06T05:59:22.710Z","etag":null,"topics":["linear-algebra","numpy","python","scipy"],"latest_commit_sha":null,"homepage":"https://arxiv.org/abs/1102.3440","language":"Fortran","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/basnijholt.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-02T18:47:45.000Z","updated_at":"2025-03-29T21:42:25.000Z","dependencies_parsed_at":"2024-09-29T22:00:53.347Z","dependency_job_id":"0dcd6591-847e-4b9b-a89e-1003017299e1","html_url":"https://github.com/basnijholt/pfapack","commit_stats":{"total_commits":70,"total_committers":3,"mean_commits":"23.333333333333332","dds":0.3142857142857143,"last_synced_commit":"e8cbe654c7f7150b97c7f5132fe0ee39553d11cd"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basnijholt%2Fpfapack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basnijholt%2Fpfapack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basnijholt%2Fpfapack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basnijholt%2Fpfapack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/basnijholt","download_url":"https://codeload.github.com/basnijholt/pfapack/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247441029,"owners_count":20939238,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["linear-algebra","numpy","python","scipy"],"created_at":"2024-09-29T22:00:42.556Z","updated_at":"2025-04-11T14:32:59.978Z","avatar_url":"https://github.com/basnijholt.png","language":"Fortran","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `pfapack`: Efficient numerical computation of the Pfaffian for dense and banded skew-symmetric matrices\n\nCode and algorithms are taken from [arXiv:1102.3440](https://arxiv.org/abs/1102.3440) which is authored by [Michael Wimmer](https://michaelwimmer.org/).\n\n[![pytest](https://github.com/basnijholt/pfapack/workflows/pytest/badge.svg)](https://github.com/basnijholt/pfapack/actions?query=workflow%3Apytest)\n[![codecov](https://img.shields.io/codecov/c/github/basnijholt/pfapack)](https://codecov.io/gh/basnijholt/pfapack)\n[![docs](https://img.shields.io/readthedocs/pfapack)](https://pfapack.readthedocs.io)\n[![version](https://img.shields.io/pypi/v/pfapack)](https://pypi.org/project/pfapack/)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pfapack)](https://pypi.org/project/pfapack/)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n\n### Install\n\n```bash\npip install pfapack\n```\n\nOr using conda:\n```bash\nconda install -c conda-forge pfapack\n```\n\n## Usage\n\n```python\nfrom pfapack import pfaffian as pf\nimport numpy.random\n\nA = numpy.random.rand(100, 100)\nA = A - A.T\npfa1 = pf.pfaffian(A)\npfa2 = pf.pfaffian(A, method=\"H\")\npfa3 = pf.pfaffian_schur(A)\nprint(pfa1, pfa2, pfa3)\n```\n\nThe package includes optimized C/FORTRAN implementations that can be used for better performance:\n```python\nfrom pfapack.ctypes import pfaffian as cpf\npfa1 = cpf(A)\npfa2 = cpf(A, method=\"H\")\nprint(pfa1, pfa2)\n```\n\n\u003e [!WARNING]\n\u003e On Windows, the C bindings require MSYS2 to be installed with the MinGW64 toolchain. The current Windows build system has some limitations and requires external dependencies. We welcome contributions to improve the Windows build system, such as using Microsoft's toolchain (MSVC) directly or finding better ways to handle the OpenBLAS dependency.\n\n## Citing\n\nIf you have used `pfapack` in your research, please cite it using the following `bib` entry:\n```\n@article{wimmer2012algorithm,\n    title={Efficient numerical computation of the pfaffian for dense and banded skew-symmetric matrices},\n    author={Michael Wimmer},\n    journal={ACM Transactions on Mathematical Software (TOMS)},\n    volume={38},\n    number={4},\n    pages={1--17},\n    year={2012},\n    publisher={ACM New York, NY, USA}\n}\n```\n\n## License\nMIT License\n\n## Contributions\n- Bas Nijholt\n- [Michael Wimmer (author of the algorithms)](https://arxiv.org/abs/1102.3440)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasnijholt%2Fpfapack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasnijholt%2Fpfapack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasnijholt%2Fpfapack/lists"}