Skip to content

Commit b101a27

Browse files
sebasvbluss
authored andcommitted
TEST: Add test for blas mat-vec product of column/row matrices
1 parent db5f26f commit b101a27

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

blas-tests/tests/oper.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,14 @@ fn dot_product() {
8787
assert_eq!(a.dot(&b), dot as i32);
8888
}
8989

90+
#[test]
91+
fn mat_vec_product_1d() {
92+
let a = arr2(&[[1.], [2.]]);
93+
let b = arr1(&[1., 2.]);
94+
let ans = arr1(&[5.]);
95+
assert_eq!(a.t().dot(&b), ans);
96+
}
97+
9098
// test that we can dot product with a broadcast array
9199
#[test]
92100
fn dot_product_0() {

0 commit comments

Comments
 (0)