dft_real
dft_real(x, inverse=False)Discrete Fourier transform of real-valued data.
Mirrors the C# Fourier.RealFFT: transforms len(x) real values in place (len(x) must be a power of two) into the positive-frequency half of the complex transform.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| x | array_like | Real-valued, power-of-two length. | required |
| inverse | bool | If True, computes the inverse transform of a complex array that is the transform of real data (matching the C# doc comment – multiply by 2/len(x) for the true inverse). |
False |
Returns
| Name | Type | Description |
|---|---|---|
| numpy.ndarray | Same length as x. |
Examples
>>> from corehydropy import dft_real
>>> len(dft_real([1, 2, 3, 4]))
4