add unit test for variance

This commit is contained in:
Vasil Nikolov 2023-04-24 00:46:06 +03:00
parent 0996b656f9
commit 029bbc9ecc
2 changed files with 9 additions and 0 deletions

View File

@ -64,3 +64,5 @@ pub use self::matrix_view::*;
pub use self::storage::*;
#[cfg(any(feature = "std", feature = "alloc"))]
pub use self::vec_storage::*;
mod variance_test;

View File

@ -0,0 +1,7 @@
#[cfg(test)]
use crate::DVector;
#[test]
fn test_variance_new() {
let v = DVector::repeat(10_000, 100000000.1234);
assert_eq!(v.variance(), 0.0)
}