We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 98a10d5 commit 1fd6c54Copy full SHA for 1fd6c54
1 file changed
python/sdist/amici/sbml_import.py
@@ -21,7 +21,7 @@
21
from collections.abc import Iterable, Sequence
22
23
import libsbml
24
-from sbmlmath import SBMLMathMLParser
+from sbmlmath import SBMLMathMLParser, TimeSymbol
25
import numpy as np
26
import sympy as sp
27
from sympy.logic.boolalg import BooleanFalse, BooleanTrue
@@ -2881,7 +2881,9 @@ def _sympy_from_sbml_math(
2881
"contains an unsupported expression: "
2882
f"{err}."
2883
)
2884
-
+ # replace special time object by `sbml_time_symbol`
2885
+ # which will later be replaced by `amici_time_symbol`
2886
+ expr = expr.replace(TimeSymbol, lambda *args: sbml_time_symbol)
2887
else:
2888
raise ValueError(
2889
f"Unsupported input: {var_or_math}, type: {type(var_or_math)}"
0 commit comments