Skip to content

Commit 49c59a8

Browse files
committed
Check LDA is zero
1 parent 9114302 commit 49c59a8

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/layout.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,12 @@ impl MatrixLayout {
3232
}
3333

3434
pub fn lda(&self) -> LDA {
35-
match *self {
36-
MatrixLayout::C((_, lda)) | MatrixLayout::F((_, lda)) => lda,
37-
}
35+
std::cmp::max(
36+
1,
37+
match *self {
38+
MatrixLayout::C((_, lda)) | MatrixLayout::F((_, lda)) => lda,
39+
},
40+
)
3841
}
3942

4043
pub fn len(&self) -> LEN {

0 commit comments

Comments
 (0)