chore: update clippy lints (#272)
* chore: fix clippy lints --------- Co-authored-by: Luis Moreno <morenol@users.noreply.github.com>
This commit is contained in:
@@ -160,7 +160,7 @@ mod tests {
|
||||
fn bg_solver() {
|
||||
let a = DenseMatrix::from_2d_array(&[&[25., 15., -5.], &[15., 18., 0.], &[-5., 0., 11.]]);
|
||||
let b = vec![40., 51., 28.];
|
||||
let expected = vec![1.0, 2.0, 3.0];
|
||||
let expected = [1.0, 2.0, 3.0];
|
||||
|
||||
let mut x = Vec::zeros(3);
|
||||
|
||||
|
||||
@@ -890,11 +890,7 @@ mod tests {
|
||||
|
||||
let y_hat = lr.predict(&x).unwrap();
|
||||
|
||||
let error: i32 = y
|
||||
.into_iter()
|
||||
.zip(y_hat.into_iter())
|
||||
.map(|(a, b)| (a - b).abs())
|
||||
.sum();
|
||||
let error: i32 = y.into_iter().zip(y_hat).map(|(a, b)| (a - b).abs()).sum();
|
||||
|
||||
assert!(error <= 1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user