Skip to content

Commit 1fd6c54

Browse files
committed
time
1 parent 98a10d5 commit 1fd6c54

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

python/sdist/amici/sbml_import.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from collections.abc import Iterable, Sequence
2222

2323
import libsbml
24-
from sbmlmath import SBMLMathMLParser
24+
from sbmlmath import SBMLMathMLParser, TimeSymbol
2525
import numpy as np
2626
import sympy as sp
2727
from sympy.logic.boolalg import BooleanFalse, BooleanTrue
@@ -2881,7 +2881,9 @@ def _sympy_from_sbml_math(
28812881
"contains an unsupported expression: "
28822882
f"{err}."
28832883
)
2884-
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)
28852887
else:
28862888
raise ValueError(
28872889
f"Unsupported input: {var_or_math}, type: {type(var_or_math)}"

0 commit comments

Comments
 (0)