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 44821c9 commit ea8dc6cCopy full SHA for ea8dc6c
tests/svd.rs
@@ -41,6 +41,13 @@ fn test_no_u(a: &Array2<f64>) {
41
assert_eq!(vt.dim().1, m);
42
}
43
44
+fn test_diag_only(a: &Array2<f64>) {
45
+ println!("a = \n{:?}", a);
46
+ let (u, _s, vt): (_, Array1<_>, _) = a.svd(false, false).unwrap();
47
+ assert!(u.is_none());
48
+ assert!(vt.is_none());
49
+}
50
+
51
macro_rules! test_svd_impl {
52
($test:ident, $n:expr, $m:expr) => {
53
paste::item! {
@@ -62,9 +69,12 @@ macro_rules! test_svd_impl {
62
69
test_svd_impl!(test, 3, 3);
63
70
test_svd_impl!(test_no_vt, 3, 3);
64
71
test_svd_impl!(test_no_u, 3, 3);
72
+test_svd_impl!(test_diag_only, 3, 3);
65
73
test_svd_impl!(test, 4, 3);
66
74
test_svd_impl!(test_no_vt, 4, 3);
67
75
test_svd_impl!(test_no_u, 4, 3);
76
+test_svd_impl!(test_diag_only, 4, 3);
68
77
test_svd_impl!(test, 3, 4);
78
test_svd_impl!(test_no_vt, 3, 4);
79
test_svd_impl!(test_no_u, 3, 4);
80
+test_svd_impl!(test_diag_only, 3, 4);
0 commit comments