{"id":13800256,"url":"https://pyfftw.github.io/pyFFTW/","last_synced_at":"2025-05-13T09:31:26.266Z","repository":{"id":2316915,"uuid":"3277149","full_name":"pyFFTW/pyFFTW","owner":"pyFFTW","description":"A pythonic python wrapper around FFTW","archived":false,"fork":false,"pushed_at":"2024-11-12T11:18:34.000Z","size":1797,"stargazers_count":391,"open_issues_count":54,"forks_count":110,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-05-13T09:08:34.051Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://pyfftw.readthedocs.io/en/latest/","language":"Python","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/pyFFTW.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2012-01-26T20:27:19.000Z","updated_at":"2025-05-04T01:22:12.000Z","dependencies_parsed_at":"2023-02-19T09:30:26.260Z","dependency_job_id":"0cf8a566-cccc-4372-be65-1f7d87fb45fd","html_url":"https://github.com/pyFFTW/pyFFTW","commit_stats":{"total_commits":639,"total_committers":31,"mean_commits":"20.612903225806452","dds":0.7856025039123631,"last_synced_commit":"a6152f83b77eb7ed757ecc03cee70c9daaad6f6d"},"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyFFTW%2FpyFFTW","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyFFTW%2FpyFFTW/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyFFTW%2FpyFFTW/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyFFTW%2FpyFFTW/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pyFFTW","download_url":"https://codeload.github.com/pyFFTW/pyFFTW/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253913081,"owners_count":21983254,"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":[],"created_at":"2024-08-04T00:01:10.870Z","updated_at":"2025-05-13T09:31:25.556Z","avatar_url":"https://github.com/pyFFTW.png","language":"Python","readme":"### Current Build Status\n\n| GitHub Actions                                                                                                                                                                                                | Read the Docs                                                                                                                           |\n| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |\n| [![Build Wheels, Test and Release](https://github.com/pyFFTW/pyFFTW/actions/workflows/wheel_tests_and_release.yml/badge.svg)](https://github.com/pyFFTW/pyFFTW/actions/workflows/wheel_tests_and_release.yml) | [![read_the_docs](https://readthedocs.org/projects/pyfftw/badge/?version=latest)](http://pyfftw.readthedocs.io/en/latest/?badge=latest) |\n\n### Conda-forge Status\n\n[![Linux](https://img.shields.io/circleci/project/github/conda-forge/pyfftw-feedstock/master.svg?label=Linux)](https://circleci.com/gh/conda-forge/pyfftw-feedstock) [![OSX](https://img.shields.io/travis/conda-forge/pyfftw-feedstock/master.svg?label=macOS)](https://travis-ci.org/conda-forge/pyfftw-feedstock) [![Windows](https://img.shields.io/appveyor/ci/conda-forge/pyfftw-feedstock/master.svg?label=Windows)](https://ci.appveyor.com/project/conda-forge/pyfftw-feedstock/branch/master)\n\n\n### Conda-forge Info\n\n| Name                                                                                                             | Downloads                                                                                                             | Version                                                                                                             | Platforms                                                                                                             |\n| ---------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |\n| [![Conda Recipe](https://img.shields.io/badge/recipe-pyfftw-green.svg)](https://anaconda.org/conda-forge/pyfftw) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/pyfftw.svg)](https://anaconda.org/conda-forge/pyfftw) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/pyfftw.svg)](https://anaconda.org/conda-forge/pyfftw) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/pyfftw.svg)](https://anaconda.org/conda-forge/pyfftw) |\n\n# PyFFTW\n\npyFFTW is a pythonic wrapper around [FFTW 3](https://www.fftw.org), the speedy\nFFT library.  The ultimate aim is to present a unified interface for all the\npossible transforms that FFTW can perform.\n\nBoth the complex DFT and the real DFT are supported, as well as on arbitrary\naxes of arbitrary shaped and strided arrays, which makes it almost\nfeature equivalent to standard and real FFT functions of ``numpy.fft``\n(indeed, it supports the ``clongdouble`` dtype which ``numpy.fft`` does not).\n\nWisdom import and export now works fairly reliably.\n\nOperating FFTW in multithreaded mode is supported.\n\npyFFTW implements the numpy and scipy fft interfaces in order for users to\ntake advantage of the speed of FFTW with minimal code modifications.\n\nA comprehensive unittest suite can be found with the source on the\n[GitHub](https://github.com/PyFFTW/PyFFTW) repository or with the source\ndistribution on [PyPI](https://pypi.org/).\n\nThe documentation can be found on\n[Read the Docs](https://pyfftw.readthedocs.io) the source is on\n[GitHub](https://github.com/PyFFTW/PyFFTW) and the python package index page\n[PyPI](https://pypi.org/). Issues and questions can be raised at the\n[GitHub Issues](https://github.com/PyFFTW/PyFFTW/issues) page.\n\n## Requirements (i.e. what it was designed for)\n\n- [Python](https://python.org) \u003e= 3.9 (lower versions *may* work)\n- [Numpy](https://www.numpy.org) \u003e= 1.20 (lower versions *may* work)\n- [FFTW](https://www.fftw.org) \u003e= 3.3 (lower versions *may* work) libraries for\n  single, double, and long double precision in serial and multithreading\n  (pthreads or openMP) versions.\n- [Cython](https://cython.org) \u003e= 0.29\n\n(install these as much as possible with your preferred package manager).\n\nIn practice, pyFFTW *may* work with older versions of these dependencies, but\nit is not tested against them.\n\nWe build wheels for PyPy 3.9, but this platform has not been tested.\n\n## Optional Dependencies\n\n- [Scipy](https://www.scipy.org) \u003e= 1.8\n- [Dask](https://dask.pydata.org) \u003e= 1.0\n\nScipy and Dask are only required in order to use their respective interfaces.\nIn practice, older versions may work, but they are not tested against.\n\n## Installation\n\nWe recommend *not* building from github, but using the release on the python\npackage index with tools such as pip:\n\n    pip install pyfftw\n\nPre-built binary wheels for 64-bit Python on Linux, Mac OS X and Windows are\navailable on the [PyPI](https://pypi.org/) page for all supported Python versions.\nNote that we only support binaries for 64-bit Python. 32-bit and ARM architectures have\nprebuilt wheels for some configurations - see below.\n\nNote that prior to Python 3.9, the Windows installation defaulted to being 32-bit\neven on 64-bit Windows, so if you are having problems installing using pip\n(typically with an error message like `ERROR: Failed building wheel for pyfftw`)\nthen please check your Python version.\n\nInstallation from PyPI may also work on other systems when the FFTW libraries\nare available, but other platforms have not been tested.\n\nAlternatively, users of the [conda](https://conda.io/docs/) package manager can\ninstall from the [conda-forge](https://conda-forge.org/) channel via:\n\n    conda install -c conda-forge pyfftw\n\nRead on if you do want to build from source...\n\n## Wheels\n\nPrebuilt wheels are available for the following configurations:\n\n|          Python version          | Windows (32 bit) | Windows (64 bit) | Windows ARM (64 bit) | MacOS | MacOS ARM | Linux (64 bit) | Linux ARM (64 bit) |\n| :------------------------------: | :--------------: | :--------------: | :------------------: | :---: | :-------- | :------------: | :----------------: |\n|   CPython \u003c 3.9 (unsupported)    |        ❌        |        ❌        |          ❌          |  ❌   | ❌        |       ❌       |         ❌         |\n|           CPython 3.9            |        ✔        |        ✔        |          ❌          |  ✔   | ✔        |       ✔       |         ✔         |\n|           CPython 3.10           |        ✔        |        ✔        |          ❌          |  ✔   | ✔        |       ✔       |         ✔         |\n|           CPython 3.11           |        ✔        |        ✔        |          ❌          |  ✔   | ✔        |       ✔       |         ✔         |\n|           CPython 3.12           |        ✔        |        ✔        |          ❌          |  ✔   | ✔        |       ✔       |         ✔         |\n|     PyPy \u003c 3.9 (unsupported)     |        ❌        |        ❌        |          ❌          |  ❌   | ❌        |      ❌       |         ❌         |\n|             PyPy 3.9             |        ❌        |        ✔        |          ❌          |  ✔   | ✔        |       ✔       |         ❌         |\n| PyPy \u003e 3.9 (unsupported for now) |        ❌        |        ❌        |          ❌          |  ❌   | ❌        |        ❌       |         ❌         |\n\nNote that Linux 32-bit wheels are available only for pyFFTW \u003c= 0.13.1.\n\nIf your configuration does not match one of these you will have to build `pyfft` from source yourself.\nSee instructions below.\n\n## Building\n\nTo build in place:\n\n    pip install -e . -v\n\nThat cythonizes the python extension and builds it into a shared library\nwhich is placed in ``pyfftw/``. The directory can then be treated as a python\npackage.\n\nAfter you've run ``setup.py`` with cython available, you then have a\nnormal C extension in the ``pyfftw`` directory.\nFurther building does not depend on cython (as long as the .c file remains).\n\nDuring configuration the available FFTW libraries are detected, so pay attention\nto the output when running ``setup.py``. On certain platforms, for example the\nlong double precision is not available. pyFFTW still builds fine but will fail\nat runtime if asked to perform a transform involving long double precision.\n\nTo build against FFTW libraries at non standard location, [some compilers are\nsensitive to the environment\nvariables](https://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html)\n`CPATH` and `LIBRARY_PATH`. Moreover, you can also use `PYFFTW_INCLUDE` and\n`PYFFTW_LIB_DIR`. If the FFTW libraries still cannot be found, you might also\nneed to set the environment variable `CC` to build with the compiler used to\ncompile the libraries.\n\nRegarding multithreading, if both posix and openMP FFTW libs are available, the\nopenMP libs are preferred. This preference can be reversed by defining the\nenvironment variable ``PYFFTW_USE_PTHREADS`` prior to building. If neither\noption is available, pyFFTW works in serial mode only.\n\nFor more ways of building and installing, see the\n[distutils documentation](http://docs.python.org/distutils/builtdist.html)\nand [setuptools documentation](https://setuptools.readthedocs.io).\n\n### Platform specific build info\n\n#### Windows\n\nTo build for windows from source, download the fftw dlls for your system and the\nheader file from [here](http://www.fftw.org/install/windows.html) (they're in\na zip file) and place them in the pyfftw directory. The files are\n``libfftw3-3.dll``, ``libfftw3l-3.dll``, ``libfftw3f-3.dll``. These libs use\npthreads for multithreading. If you're using a version of FFTW other than 3.3,\nit may be necessary to copy ``fftw3.h`` into ``include\\win``.\n\nThe builds on PyPI use mingw for the 32-bit release and the Windows SDK\nC++ compiler for the 64-bit release. The scripts should handle this\nautomatically. If you want to compile for 64-bit Windows, you have to use\nthe MS Visual C++ compiler. Set up your environment as described\n[here](https://github.com/cython/cython/wiki/CythonExtensionsOnWindows) and then\nrun ``setup.py`` with the version of python you wish to target and a suitable\nbuild command.\n\nFor using the MS Visual C++ compiler, you'll need to create a set of\nsuitable ``.lib`` files as described on the\n[FFTW page](http://www.fftw.org/install/windows.html).\n\n#### Mac OSX\n\nInstall FFTW from [homebrew](http://brew.sh):\n\n    brew install fftw\n\nSet temporary environmental variables, such that pyfftw finds fftw:\n\n    export DYLD_LIBRARY_PATH=/usr/local/lib\n    export LDFLAGS=\"-L/usr/local/lib\"\n    export CFLAGS=\"-I/usr/local/include\"\n\nNow install pyfftw from pip:\n\n    pip install pyfftw\n\nIt has been suggested that [macports](https://www.macports.org) might also work\nfine. You should then replace the LD environmental variables above with the\nright ones.\n\n- DYLD - path for libfftw3.dylib etc - ``find /usr -name libfftw3.dylib``\n- LDFLAGS - path for fftw3.h - ``find /usr -name fftw3.h``\n\n#### FreeBSD\n\nInstall FFTW from ports tree or ``pkg``:\n\n    - math/fftw3\n    - math/fftw3-float\n    - math/fftw3-long\n\nPlease install all of them, if possible.\n\n## Testing\n\nTests should be run using `pytest`. Install using:\n\n```sh\npip install pytest\n```\n\nTo run tests against the installed (compiled) `pyFFTW` wheel, use:\n\n```sh\npytest --import-mode=append tests/\n```\n\n**Note**: `--import-mode=append` is needed to prevent `pytest` patching `sys.path`\nin a way that resolves the local installation over the wheel installation.\n\n## Contributions\n\nContributions are always welcome and valued. The primary restriction on\naccepting contributions is that they are exhaustively tested. The bulk of\npyFFTW has been developed in a test-driven way (i.e. the test to be\nsatisfied is written before the code). I strongly encourage potential\ncontributors to adopt such an approach.\n\nSee some of my philosophy on testing in development [here]\n(https://hgomersall.wordpress.com/2014/10/03/from-test-driven-development-and-specifications).\nIf you want to argue with the philosophy, there is probably a good place to\ndo it.\n\nNew contributions should adhere to\n[PEP 8](https://www.python.org/dev/peps/pep-0008), but this is only weakly\nenforced (there is loads of legacy stuff that breaks it, and things like a\nsingle trailing whitespace is not a big deal).\n\nThe best place to start with contributing is by raising an issue detailing the\nspecifics of what you wish to achieve (there should be a clear use-case for\nany new functionality). I tend to respond pretty quickly and am happy to help\nwhere I can with any conceptual issues.\n\nI suggest reading the issues already open in order that you know where things\nmight be heading, or what others are working on.\n\n### Use PDM to setup a virtual environment for the development of pyFFTW\n\n[PDM], which can be for example installed with [Pipx], can be used to setup a virtual\nenvironment `.venv` for the development of pyFFTW and install pyFFTW in editable mode.\n\n```sh\npdm sync --clean -v\n```\n\nThis environment is described in the file `pyproject.toml` and the exact versions of\nthe packages are listed in a lock file `pdm.lock`. Maintainers can update the lockfile\nby running (typically in a PR before each release)\n\n```sh\npdm lock\n```\n\n[pdm]: https://pdm-project.org\n[pipx]: https://github.com/pypa/pipx","funding_links":[],"categories":["Audio Related Packages"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/pyfftw.github.io%2FpyFFTW%2F","html_url":"https://awesome.ecosyste.ms/projects/pyfftw.github.io%2FpyFFTW%2F","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/pyfftw.github.io%2FpyFFTW%2F/lists"}