Skip to content

Commit 10d7b55

Browse files
committed
Add test for matching shape check in EighInplace
1 parent 1df28a2 commit 10d7b55

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ndarray-linalg/tests/eigh.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
use ndarray::*;
22
use ndarray_linalg::*;
33

4+
#[should_panic]
5+
#[test]
6+
fn eigh_generalized_shape_mismatch() {
7+
let a = Array2::<f64>::eye(3);
8+
let b = Array2::<f64>::eye(2);
9+
let _ = (a, b).eigh_inplace(UPLO::Upper);
10+
}
11+
412
#[test]
513
fn fixed() {
614
let a = arr2(&[[3.0, 1.0, 1.0], [1.0, 3.0, 1.0], [1.0, 1.0, 3.0]]);

0 commit comments

Comments
 (0)