Function hamming_window
pub fn hamming_window(
size: usize,
periodic: bool,
options: impl Into<TensorCreationOptions>,
) -> Tensor<1>Expand description
Creates a 1D Hamming window.
w_n = 25/46 - 21/46 * cos(2πn/N) where N = size (periodic) or N = size-1 (symmetric)
§Notes
size == 0returns an empty tensor.size == 1returns[1.0]regardless ofperiodic.
§Example
use burn_core::tensor::Device;
use burn_signal::hamming_window;
let device = Default::default();
let window = hamming_window(8, true, &device);
println!("{window}");