ndarray-linalg icon indicating copy to clipboard operation
ndarray-linalg copied to clipboard

SolveH uses incorrect triangle

Open jbncode opened this issue 3 years ago • 0 comments

The documentation for SolveH says "Note that only the upper triangular portion of the matrix is used.". However it actually uses the lower triangular portion. For example:

let a = array![[1.0, 3.0],
               [5.0, 2.0]];
let b = array![29.0, 30.0];
let x = a.solveh(&b).unwrap();
println!("solution = {x:.1}");

prints solution = [4.0, 5.0], which is using the 5.0 off-diagonal element rather than 3.0.

jbncode avatar Jul 26 '22 02:07 jbncode