summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--polymatrix/expression/mixins/elemmultexprmixin.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/polymatrix/expression/mixins/elemmultexprmixin.py b/polymatrix/expression/mixins/elemmultexprmixin.py
index 0d89361..fe5d6ab 100644
--- a/polymatrix/expression/mixins/elemmultexprmixin.py
+++ b/polymatrix/expression/mixins/elemmultexprmixin.py
@@ -4,6 +4,7 @@ import typing
import dataclassabc
from polymatrix.polymatrix.init import init_poly_matrix, init_broadcast_poly_matrix
+from polymatrix.polymatrix.typing import MonomialIndex
from polymatrix.expression.mixins.expressionbasemixin import ExpressionBaseMixin
from polymatrix.polymatrix.mixins import PolyMatrixMixin
from polymatrix.polymatrix.abc import PolyMatrix
@@ -60,9 +61,14 @@ class ElemMultExprMixin(ExpressionBaseMixin):
# monomial = tuple(sorted(left_monomial + right_monomial))
- new_monomial = merge_monomial_indices(
- (left_monomial, right_monomial)
- )
+ # TODO: This line broke since the introduction of index
+ # types, investigate why. Replacing it
+ # MonomialIndex.product fixes the issue
+
+ # new_monomial = merge_monomial_indices(
+ # (left_monomial, right_monomial)
+ # )
+ new_monomial = MonomialIndex.product(left_monomial, right_monomial)
if new_monomial not in polynomial:
polynomial[new_monomial] = 0