diff --git a/src/numeric/impl_numeric.rs b/src/numeric/impl_numeric.rs index afcd7e896..ccbad9186 100644 --- a/src/numeric/impl_numeric.rs +++ b/src/numeric/impl_numeric.rs @@ -112,6 +112,14 @@ where sum } + // implement round + pub fn round(&self) -> Array + where + A: Float, + { + self.mapv(|x| x.round()) + } + /// Return variance of elements in the array. /// /// The variance is computed using the [Welford one-pass