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.)
This commit is contained in:
David Nadlinger 2020-07-29 23:25:29 +01:00
parent 7bdd6785b7
commit 0d8fbd4f19

View File

@ -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