forked from M-Labs/nalgebra
add unit test for variance
This commit is contained in:
parent
0996b656f9
commit
029bbc9ecc
@ -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;
|
||||
|
7
src/base/variance_test.rs
Normal file
7
src/base/variance_test.rs
Normal 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)
|
||||
}
|
Loading…
Reference in New Issue
Block a user