summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--polymatrix/expression/init/initfromsympyexpr.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/polymatrix/expression/init/initfromsympyexpr.py b/polymatrix/expression/init/initfromsympyexpr.py
index 3fb52f7..f8dbd94 100644
--- a/polymatrix/expression/init/initfromsympyexpr.py
+++ b/polymatrix/expression/init/initfromsympyexpr.py
@@ -3,6 +3,7 @@ import numpy as np
import sympy
from polymatrix.expression.impl.fromsympyexprimpl import FromSympyExprImpl
+from polymatrix.expression.mixins.expressionbasemixin import ExpressionBaseMixin
def init_from_sympy_expr(
@@ -39,6 +40,9 @@ def init_from_sympy_expr(
case np.number:
data = ((float(data),),)
+ case ExpressionBaseMixin():
+ return data
+
case _:
if not isinstance(data, (float, int, sympy.Expr)):
raise Exception(f'{data=}, {type(data)=}')