Skip to content

Commit ffb6bef

Browse files
committed
Merge branch 'master' into lapack
2 parents fea408d + 4d0d8c3 commit ffb6bef

File tree

6 files changed

+365
-202
lines changed

6 files changed

+365
-202
lines changed

.github/workflows/ndarray-linalg.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- uses: actions-rs/cargo@v1
2929
with:
3030
command: test
31-
args: --manifest-path=ndarray-linalg/Cargo.toml --features=${{ matrix.feature }} --no-default-features
31+
args: --manifest-path=ndarray-linalg/Cargo.toml --features=${{ matrix.feature }} --no-default-features --all-targets
3232

3333
linux:
3434
runs-on: ubuntu-18.04
@@ -49,4 +49,4 @@ jobs:
4949
- uses: actions-rs/cargo@v1
5050
with:
5151
command: test
52-
args: --manifest-path=ndarray-linalg/Cargo.toml --features=${{ matrix.feature }} --no-default-features
52+
args: --manifest-path=ndarray-linalg/Cargo.toml --features=${{ matrix.feature }} --no-default-features --all-targets

lax/src/least_squares.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ macro_rules! impl_least_squares {
4242
}
4343
let k = ::std::cmp::min(m, n);
4444
let nrhs = 1;
45+
let ldb = match a_layout {
46+
MatrixLayout::F { .. } => m.max(n),
47+
MatrixLayout::C { .. } => 1,
48+
};
4549
let rcond: Self::Real = -1.;
4650
let mut singular_values: Vec<Self::Real> = vec![Self::Real::zero(); k as usize];
4751
let mut rank: i32 = 0;
@@ -54,9 +58,7 @@ macro_rules! impl_least_squares {
5458
a,
5559
a_layout.lda(),
5660
b,
57-
// this is the 'leading dimension of b', in the case where
58-
// b is a single vector, this is 1
59-
nrhs,
61+
ldb,
6062
&mut singular_values,
6163
rcond,
6264
&mut rank,

lax/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ pub trait Lapack:
110110
+ Triangular_
111111
+ Tridiagonal_
112112
+ Rcond_
113+
+ LeastSquaresSvdDivideConquer_
113114
{
114115
}
115116

0 commit comments

Comments
 (0)