mirror of https://github.com/m-labs/artiq
test/lit: Add a test for matrix binary operations
No reason to believe other operations won't work the same. (More exhaustive tests to follow using embedding for comparison against NumPy.)pull/1508/head
parent
7bdd6785b7
commit
0d8fbd4f19
|
@ -38,3 +38,12 @@ assert c[2] == 0
|
|||
# assert c[0] == 4.0
|
||||
# assert c[1] == 2.5
|
||||
# assert c[2] == 2.0
|
||||
|
||||
|
||||
d = array([[1, 2], [3, 4]])
|
||||
e = array([[5, 6], [7, 8]])
|
||||
f = d + e
|
||||
assert f[0][0] == 6
|
||||
assert f[0][1] == 8
|
||||
assert f[1][0] == 10
|
||||
assert f[1][1] == 12
|
||||
|
|
Loading…
Reference in New Issue