fix
This commit is contained in:
parent
5f341bc144
commit
538587b81f
@ -86,7 +86,7 @@ impl Variance0 {
|
||||
if self.avg.len() < 1 + ddof as u64 {
|
||||
return 0.;
|
||||
}
|
||||
self.sum_2 / f64::approx_from(self.avg.len() - ddof).unwrap()
|
||||
self.sum_2 / f64::approx_from(self.avg.len() - ddof as u64).unwrap()
|
||||
}
|
||||
|
||||
/// Calculate the population variance of the sample.
|
||||
|
@ -86,7 +86,7 @@ impl Variance1 {
|
||||
if self.avg.len() < 1 + ddof as u64 {
|
||||
return 0.;
|
||||
}
|
||||
self.sum_2 / f64::approx_from(self.avg.len() - ddof).unwrap()
|
||||
self.sum_2 / f64::approx_from(self.avg.len() - ddof as u64).unwrap()
|
||||
}
|
||||
|
||||
/// Calculate the population variance of the sample.
|
||||
|
Loading…
Reference in New Issue
Block a user