Skip to content

Commit 5e660f1

Browse files
committed
Bug fix
1 parent 0dd256b commit 5e660f1

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/triangular.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ where
4747
So: DataMut<Elem = A> + DataOwned,
4848
{
4949
fn solve_triangular_into(&self, uplo: UPLO, diag: Diag, mut b: ArrayBase<So, Ix2>) -> Result<ArrayBase<So, Ix2>> {
50-
self.solve_triangular(uplo, diag, &mut b)?;
50+
self.solve_triangular_mut(uplo, diag, &mut b)?;
5151
Ok(b)
5252
}
5353
}

tests/triangular.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,11 @@ where
2929
{
3030
println!("a = {:?}", &a);
3131
println!("b = {:?}", &b);
32-
let ans = b.clone();
33-
let x = a.solve_triangular(uplo, Diag::NonUnit, b).unwrap();
32+
let x = a.solve_triangular(uplo, Diag::NonUnit, &b).unwrap();
3433
println!("x = {:?}", &x);
3534
let b_ = a.dot(&x);
3635
println!("Ax = {:?}", &b_);
37-
assert_close_l2!(&b_, &ans, tol);
36+
assert_close_l2!(&b_, &b, tol);
3837
}
3938

4039
#[test]

0 commit comments

Comments
 (0)