Skip to content

Commit 350aa21

Browse files
committed
Add test cases for different data types
1 parent e0e3d3a commit 350aa21

File tree

2 files changed

+241
-61
lines changed

2 files changed

+241
-61
lines changed

src/lapack/least_squares.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ macro_rules! impl_least_squares {
9292
b: &mut [Self],
9393
) -> Result<LeastSquaresOutput<Self>> {
9494
let (m, n) = a_layout.size();
95-
if m != b_layout.size().0 || a_layout.lapacke_layout() != b_layout.lapacke_layout()
95+
if (m as usize) > b.len()
96+
|| (n as usize) > b.len()
97+
|| a_layout.lapacke_layout() != b_layout.lapacke_layout()
9698
{
9799
return Err(LinalgError::Shape(ShapeError::from_kind(
98100
ErrorKind::IncompatibleShape,

0 commit comments

Comments
 (0)