From d8099617839e3b4cc0052873778d84047d8dd54a Mon Sep 17 00:00:00 2001 From: m5l14i11 Date: Fri, 14 Jul 2023 20:12:35 +0300 Subject: [PATCH] fix --- ta_lib/overlap/src/wma.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ta_lib/overlap/src/wma.rs b/ta_lib/overlap/src/wma.rs index 64322c77..b2cd8ce2 100644 --- a/ta_lib/overlap/src/wma.rs +++ b/ta_lib/overlap/src/wma.rs @@ -1,6 +1,6 @@ use core::series::Series; -pub fn wma(source: &[f64], period: usize) -> Series { +pub fn wma(source: &[f64], period: usize) -> Vec { let len = source.len(); let mut wma = Series::empty(len); @@ -20,7 +20,7 @@ pub fn wma(source: &[f64], period: usize) -> Series { wma[i] = Some(sum / weight_sum); } - wma.nz(Some(0.0)) + wma.nz(Some(0.0)).into() } #[cfg(test)]