get_window

Function get_window 

Source
pub fn get_window(
    window_type: &str,
    length: usize,
    periodic: bool,
) -> CoreResult<Vec<f64>>
Expand description

Get window function compatible with SciPy API

This is a wrapper around generate_window that returns CoreResult for consistency with other SciRS2 functions.

§Arguments

  • window_type - Type of window function (“hamming”, “hann”, “rectangular”, etc.)
  • length - Length of the window
  • periodic - Whether the window should be periodic (default: false)

§Returns

  • Window function values as a vector wrapped in CoreResult

§Examples

use scirs2_core::utils::get_window;

let hamming = get_window("hamming", 5, false).unwrap();
assert_eq!(hamming.len(), 5);