pub fn resample<S, F>(
x: &ArrayBase<S, Ix1>,
num: usize,
axis: usize,
window: Option<&Array1<F>>,
) -> Result<Array1<F>>Expand description
Resample a time series to a new number of samples using Fourier method
§Arguments
x- Input time seriesnum- Number of samples in the resampled signalaxis- Axis along which to resample (default: 0)window- Optional window applied in the Fourier domain
§Returns
Resampled time series
§Example
use scirs2_core::ndarray::array;
use scirs2_series::utils::resample;
let x = array![1.0, 2.0, 3.0, 4.0, 5.0];
let resampled = resample(&x.view(), 10, 0, None).unwrap();
assert_eq!(resampled.len(), 10);