Skip to main content

UDFT: Unitary Discrete Fourier Transform (and related)

licence pypi status version maintained Documentation Status

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 Perceval 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.txt follows the llms.txt proposal and gives agents a map of the documentation.

  • skills/udft is an Agent Skill that teaches agents the conventions of udft (unitary normalization, last axes, irdftn shape, ir2fr convolution model). In Claude Code, install it from this repository, which is also a plugin marketplace:

    /plugin install udft --marketplace forieux/udft
    

    or, in two steps, /plugin marketplace add forieux/udft then /plugin install udft@udft. For other agents, copy the skills/udft directory into their skills directory.

License

The code is in the public domain.

Metadata

Release files for udft 4.0.5

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

Source distribution (sdist)

Source distribution for udft 4.0.5
File Size Uploaded Provenance Actions
udft-4.0.5.tar.gz 47.1 kB Without provenance Details for udft-4.0.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for udft 4.0.5
File Interpreter ABI Platform Actions
udft-4.0.5-py3-none-any.whl Python 3 none any Details for udft-4.0.5-py3-none-any.whl

Total release size: 56.5 kB

Release files / udft-4.0.5.tar.gz

Download URL udft-4.0.5.tar.gz
Size 47.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1892d93bd30a90018964d6467e57f91269b36c39e0e77ee111b0774c787d306d
BLAKE2b-256 checksum
How to use checksums
b2bc6682db68390294f1cd57248c745dda789cfd31826ac098e3124354e32a25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","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-4.0.5-py3-none-any.whl

Download URL udft-4.0.5-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3aab433031a48a1d0cd762dbe632bb4dfa65b607f57309819b3e4876ec429dc0
BLAKE2b-256 checksum
How to use checksums
6e03fda005cb949cadbeab7e7b00df0f6b8affe07cd2b2b546e0d58f8499f4f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","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 4.0.5

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.

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