summaryrefslogtreecommitdiffstats
path: root/test_polymatrix/test_tomatrixrepr.py
diff options
context:
space:
mode:
authorMichael Schneeberger <michael.schneeberger@fhnw.ch>2022-08-10 10:41:49 +0200
committerMichael Schneeberger <michael.schneeberger@fhnw.ch>2022-08-10 10:41:49 +0200
commit456de40e50fda4b5074553bae1b6e56a1fcd9f19 (patch)
tree980ba815648f58af179266fbaac0962f2f12c890 /test_polymatrix/test_tomatrixrepr.py
parentadd inverse property to truncate expression (diff)
downloadpolymatrix-456de40e50fda4b5074553bae1b6e56a1fcd9f19.tar.gz
polymatrix-456de40e50fda4b5074553bae1b6e56a1fcd9f19.zip
fix bug in test TestToMatrixRepr
Diffstat (limited to 'test_polymatrix/test_tomatrixrepr.py')
-rw-r--r--test_polymatrix/test_tomatrixrepr.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/test_polymatrix/test_tomatrixrepr.py b/test_polymatrix/test_tomatrixrepr.py
index 181f6fa..1af25dd 100644
--- a/test_polymatrix/test_tomatrixrepr.py
+++ b/test_polymatrix/test_tomatrixrepr.py
@@ -6,7 +6,7 @@ from polymatrix.expression.init.initfromtermsexpr import init_from_terms_expr
from polymatrix.expression.init.initlinearinexpr import init_linear_in_expr
-class TestLinearIn(unittest.TestCase):
+class TestToMatrixRepr(unittest.TestCase):
def test_1(self):
underlying_terms = {
@@ -27,12 +27,12 @@ class TestLinearIn(unittest.TestCase):
expr = init_from_terms_expr(terms=underlying_terms, shape=(3, 1))
state = init_expression_state(n_param=2)
- state, result = polymatrix.to_matrix_equations((expr,), (0, 1)).apply(state)
+ state, result = polymatrix.to_matrix_repr((expr,), (0, 1)).apply(state)
- A0 = result.matrix_equations[0][0]
- A1 = result.matrix_equations[0][1]
- A2 = result.matrix_equations[0][2]
- A3 = result.matrix_equations[0][3]
+ A0 = result.data[0][0]
+ A1 = result.data[0][1]
+ A2 = result.data[0][2]
+ A3 = result.data[0][3]
self.assertEquals(A0[0, 0], 1.0)