pub fn fftn<T>(
input: &ArrayD<T>,
shape: Option<Vec<usize>>,
axes: Option<Vec<usize>>,
norm: Option<&str>,
_overwrite_x: Option<bool>,
_workers: Option<usize>,
) -> FFTResult<ArrayD<Complex64>>
Expand description
Compute the N-dimensional Fast Fourier Transform
§Arguments
input
- Input N-dimensional arrayshape
- Shape of the output (optional)axes
- Axes along which to compute the FFT (optional)norm
- Normalization mode: “backward”, “ortho”, or “forward” (optional)overwrite_x
- Whether to overwrite the input array (optional)workers
- Number of worker threads to use (optional)
§Returns
An N-dimensional array of complex values representing the FFT result
§Examples
use scirs2_fft::fftn;
use scirs2_core::ndarray::{Array, IxDyn};
// Create a 3D array
let mut data = Array::zeros(IxDyn(&[2, 2, 2]));
data[[0, 0, 0]] = 1.0;
data[[1, 1, 1]] = 1.0;
// Compute the N-dimensional FFT
let result = fftn(&data, None, None, None, None, None).unwrap();
// Check dimensions
assert_eq!(result.shape(), &[2, 2, 2]);