Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
m5l14i11 committed Jul 14, 2023
1 parent e05b7d7 commit d809961
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ta_lib/overlap/src/wma.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use core::series::Series;

pub fn wma(source: &[f64], period: usize) -> Series<f64> {
pub fn wma(source: &[f64], period: usize) -> Vec<f64> {
let len = source.len();
let mut wma = Series::empty(len);

Expand All @@ -20,7 +20,7 @@ pub fn wma(source: &[f64], period: usize) -> Series<f64> {
wma[i] = Some(sum / weight_sum);
}

wma.nz(Some(0.0))
wma.nz(Some(0.0)).into()
}

#[cfg(test)]
Expand Down

0 comments on commit d809961

Please sign in to comment.