1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
// ferray-fft: Complete numpy.fft parity with plan caching
//
//! FFT operations for the ferray numeric computing library.
//!
//! This crate provides the full `numpy.fft` surface:
//!
//! - **Complex FFTs**: [`fft`], [`ifft`], [`fft2`], [`ifft2`], [`fftn`], [`ifftn`]
//! - **Real FFTs**: [`rfft`], [`irfft`], [`rfft2`], [`irfft2`], [`rfftn`], [`irfftn`]
//! - **Hermitian FFTs**: [`hfft`], [`ihfft`]
//! - **Frequency utilities**: [`fftfreq`], [`rfftfreq`]
//! - **Shift utilities**: [`fftshift`], [`ifftshift`]
//! - **Plan caching**: [`FftPlan`] for efficient repeated transforms
//! - **Normalization**: [`FftNorm`] enum matching NumPy's `norm` parameter
//!
//! ## Precision
//!
//! All FFT functions are generic over [`FftFloat`], implemented for both
//! `f32` and `f64`. The same call works with either precision:
//!
//! ```ignore
//! let spectrum_f64 = ferray_fft::fft(&complex_f64_array, None, None, FftNorm::Backward)?;
//! let spectrum_f32 = ferray_fft::fft(&complex_f32_array, None, None, FftNorm::Backward)?;
//! ```
//!
//! Plan caches are per-precision — using only f64 means the f32 plan
//! cache is never constructed.
//!
//! ## Real-input convenience
//!
//! Real arrays can be transformed with the full complex FFT via
//! [`fft_real`] / [`ifft_real`] / [`fft_real2`] / [`fft_realn`], which
//! auto-promote real inputs to complex before calling the standard
//! complex FFT. For the half-spectrum form use [`rfft`] / [`rfftn`]
//! instead.
//!
//! Internally powered by [`rustfft`](https://crates.io/crates/rustfft)
//! and [`realfft`](https://crates.io/crates/realfft) with automatic plan
//! caching for repeated transforms of the same size.
// Re-export public API at crate root for ergonomic access.
// Normalization
pub use FftNorm;
// Plan caching
pub use FftPlan;
// Complex FFTs (REQ-1..REQ-4)
pub use ;
// Real-input convenience wrappers — auto-promote real arrays to complex.
// For the Hermitian-folded half-spectrum form use `rfft`/`rfftn` instead.
pub use ;
// Real FFTs (REQ-5..REQ-7)
pub use ;
// Hermitian FFTs (REQ-8)
pub use ;
// Frequency utilities (REQ-9, REQ-10)
pub use ;
// Shift utilities (REQ-11)
pub use ;