diff options
author | Michael Schneeberger <michael.schneeberger@fhnw.ch> | 2023-02-09 10:36:19 +0100 |
---|---|---|
committer | Michael Schneeberger <michael.schneeberger@fhnw.ch> | 2023-02-09 10:36:19 +0100 |
commit | 393d1d7e5d4bb700bcbcbd2fd1fe3005bad17dd1 (patch) | |
tree | c301c32a74e3c5dd21ff262127a1b5667a321c2c /test_polymatrix/test_tomatrixrepr.py | |
parent | sympy.expand a sympy expression before converting it to a polymatrix (diff) | |
download | polymatrix-393d1d7e5d4bb700bcbcbd2fd1fe3005bad17dd1.tar.gz polymatrix-393d1d7e5d4bb700bcbcbd2fd1fe3005bad17dd1.zip |
update test cases
Diffstat (limited to 'test_polymatrix/test_tomatrixrepr.py')
-rw-r--r-- | test_polymatrix/test_tomatrixrepr.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test_polymatrix/test_tomatrixrepr.py b/test_polymatrix/test_tomatrixrepr.py index 1af25dd..88a35f2 100644 --- a/test_polymatrix/test_tomatrixrepr.py +++ b/test_polymatrix/test_tomatrixrepr.py @@ -24,10 +24,18 @@ class TestToMatrixRepr(unittest.TestCase): }, } + variable_terms = { + (0, 0): {((0, 1),): 1}, + (1, 0): {((1, 1),): 1}, + } + expr = init_from_terms_expr(terms=underlying_terms, shape=(3, 1)) state = init_expression_state(n_param=2) - state, result = polymatrix.to_matrix_repr((expr,), (0, 1)).apply(state) + state, result = polymatrix.to_matrix_repr( + (expr,), + init_from_terms_expr(terms=variable_terms, shape=(2, 1),), + ).apply(state) A0 = result.data[0][0] A1 = result.data[0][1] |