Skip to content

Commit e9f9f6a

Browse files
committed
Increase precision in orthonormalization test
1 parent 93f8b44 commit e9f9f6a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lobpcg/lobpcg.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ pub fn lobpcg<A: Float + Scalar + Lapack + ScalarOperand + PartialOrd + Default,
396396
let (vals, vecs, rnorm) = best_result.unwrap();
397397
let rnorm = rnorm.into_iter().map(|x| Scalar::from_real(x)).collect();
398398

399-
dbg!(&residual_norms_history);
399+
//dbg!(&residual_norms_history);
400400

401401
match final_norm {
402402
Ok(_) => EigResult::Ok(vals, vecs, rnorm),
@@ -445,7 +445,7 @@ mod tests {
445445
/// Test orthonormalization of a random matrix
446446
#[test]
447447
fn test_orthonormalize() {
448-
let matrix = Array2::random((10, 10), Uniform::new(-10., 10.));
448+
let matrix: Array2<f64> = Array2::random((10, 10), Uniform::new(-10., 10.));
449449

450450
let (n, l) = orthonormalize(matrix.clone()).unwrap();
451451

@@ -455,7 +455,7 @@ mod tests {
455455

456456
// compare returned factorization with QR decomposition
457457
let (_, r) = matrix.qr().unwrap();
458-
close_l2(&r.mapv(|x: f32| x.abs()), &l.t().mapv(|x| x.abs()), 1e-2);
458+
close_l2(&r.mapv(|x| x.abs()), &l.t().mapv(|x| x.abs()), 1e-2);
459459
}
460460

461461
fn assert_symmetric(a: &Array2<f64>) {

0 commit comments

Comments
 (0)