We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a199fa commit 7e3cd8bCopy full SHA for 7e3cd8b
lax/src/least_squares.rs
@@ -42,6 +42,10 @@ macro_rules! impl_least_squares {
42
}
43
let k = ::std::cmp::min(m, n);
44
let nrhs = 1;
45
+ let ldb = match a_layout {
46
+ MatrixLayout::F { .. } => m.max(n),
47
+ MatrixLayout::C { .. } => 1,
48
+ };
49
let rcond: Self::Real = -1.;
50
let mut singular_values: Vec<Self::Real> = vec![Self::Real::zero(); k as usize];
51
let mut rank: i32 = 0;
@@ -54,9 +58,7 @@ macro_rules! impl_least_squares {
54
58
a,
55
59
a_layout.lda(),
56
60
b,
57
- // this is the 'leading dimension of b', in the case where
- // b is a single vector, this is 1
- nrhs,
61
+ ldb,
62
&mut singular_values,
63
rcond,
64
&mut rank,
0 commit comments