UDFT: Unitary Discrete Fourier Transform (and related)
This module implements unitary discrete Fourier transform, that is orthonormal
|det(F)| = 1 and F⁻¹ = F^*. This module existed before the introduction of the
norm="ortho" keyword and is now a very (very) thin wrapper around libraries.
It is useful for convolution [1]: they respect the Parseval equality, e.g., the
value of the null frequency is equal to 1/√N * ∑ₙ xₙ.
[1] B. R. Hunt "A matrix theory proof of the discrete convolution theorem", IEEE
Trans. on Audio and Electroacoustics, vol. au-19, no. 4, pp. 285-288, dec. 1971
There is also functions related to Fourier and convolution like ir2fr.
UDFT use array API standard. Thanks
to this last point, any array library that follow the standard (Numpy,
PyTorch, cupy, ...) can be used by udft that use their respective
namespace.
If you are having issues, please let me know
francois.orieux AT universite-paris-saclay.fr
Installation and documentation
UDFT is just the file udft.py and depends on
array-api-compat and numpy only and
therefor is compatible with numpy, pytorch, jax, cupy...
The API is simple and opinionated for good reason. If you need more parameters or options, I simply encourage you to directly use API of your array library.
Documentation is here. I recommend using poetry or uv for installation
poetry add udft
or
poetry add udft[scipy]
For a quick and dirty installation, just copy the udft.py file: it is quite
stable, follow the Semantic Versioning,
and futur major changes are unlikely.
The code is hosted on GitHub.
Using udft with AI agents
llms.txtfollows the llms.txt proposal and gives agents a map of the documentation.skills/udftis an Agent Skill that teaches agents the conventions of udft. In Claude Code, install it from this repository, which is also a plugin marketplace:
or with/plugin install udft --marketplace forieux/udft/plugin marketplace add forieux/udftthen/plugin install udft@udft. For other agents, copy theskills/udftdirectory into their skills directory.
How AI is used
This project is not vibecoded. But with performant AI agents, I use them for bug tracking and design reflection, not for code writing. I write the code, but the one proposed by the agent is in the window on the side, obviously.
The agent and I write documentation. I reread the agent part, and the agent reread my part, and I chose to commit. The agent writes all tests. I chose that approach because I don't have the time to write all the documentation and tests.
I think this is a good trade-off for a project maintained by one person. It allows me to propose a more polished version of what I publish, as if I were a full-time developer, which is also good for my own use.
License
The code is in the public domain.
Metadata
Release files for udft 6.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| udft-6.0.0.tar.gz | 59.8 kB | Without provenance | Details for udft-6.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| udft-6.0.0-py3-none-any.whl | Python 3 | none | any | Details for udft-6.0.0-py3-none-any.whl |
Total release size: 70.5 kB
Release files / udft-6.0.0.tar.gz
| Download URL | udft-6.0.0.tar.gz |
|---|---|
| Size | 59.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9313cc72ea3e96563631f2ad7f8ca46db35b1a6b1e45b834c047eaac5d02f8d9
|
|
BLAKE2b-256 checksum How to use checksums |
a8a5304a7a50bf16ad54dfb81cd0adf74aa89bccc74f01f5ea38b2461909ca38
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / udft-6.0.0-py3-none-any.whl
| Download URL | udft-6.0.0-py3-none-any.whl |
|---|---|
| Size | 10.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2507358433c440f7dc771422b0dbda5f5c4cdf59782719d804f906b1b2df7f0e
|
|
BLAKE2b-256 checksum How to use checksums |
30ea49670feef133043efefddaaed1a93978e9894c55576133d8d9cc9e9dead3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for udft 6.0.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.