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 f72d7a0 commit 0b90ff5Copy full SHA for 0b90ff5
tests/inner.rs
@@ -0,0 +1,26 @@
1
+use ndarray::*;
2
+use ndarray_linalg::*;
3
+
4
+#[should_panic]
5
+#[test]
6
+fn size_shoter() {
7
+ let a: Array1<f32> = Array::zeros(3);
8
+ let b = Array::zeros(4);
9
+ a.inner(&b);
10
+}
11
12
13
14
+fn size_longer() {
15
16
17
+ b.inner(&a);
18
19
20
21
+fn abs() {
22
+ let a: Array1<c32> = random(1);
23
+ let aa = a.inner(&a);
24
+ assert_aclose!(aa.re(), a.norm().powi(2), 1e-5);
25
+ assert_aclose!(aa.im(), 0.0, 1e-5);
26
0 commit comments