ndarray-linalg 0.4.0

Linear algebra package for rust-ndarray using LAPACK
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
include!("header.rs");

#[test]
fn n_columns() {
    let a = random_owned(3, 2, true);
    let (n, v) = normalize(a.clone(), NormalizeAxis::Column);
    all_close_l2(&n.dot(&from_diag(&v)), &a, 1e-7).unwrap();
}

#[test]
fn n_rows() {
    let a = random_owned(3, 2, true);
    let (n, v) = normalize(a.clone(), NormalizeAxis::Row);
    all_close_l2(&from_diag(&v).dot(&n), &a, 1e-7).unwrap();
}