shards
shards copied to clipboard
Math.MatMul: should only allow count relationship between columns of first matrix, and lines of second matrix
Describe the bug
Matrix product in Math.MatMul allows incompatible count relationship between columns of first matrix, and lines of second matrix.
To Reproduce
[@f4(1 2 3 4) @f4(5 6 7 8)] | Math.MatMul([@f4(9 10 11 12) @f4(13 14 15 16)])
;=> [(59 78 97 116) (83 110 137 164) (0 0 0 0) (0 0 0 0)]
first matrix: columns=4 second matrix: lines=2
Expected behavior The number of columns in the first matrix should be equal to the number of lines in the second matrix.