Skip to content

Commit cf9d349

Browse files
FFroehlichdweindl
andauthored
simplify ID handling in DEModel (#3005)
* Remove unused strip_pysb function and simplify ID handling in DEModel * Update python/sdist/amici/de_model.py --------- Co-authored-by: Daniel Weindl <dweindl@users.noreply.github.com>
1 parent de6c323 commit cf9d349

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

python/sdist/amici/de_model.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
_default_simplify,
5252
amici_time_symbol,
5353
smart_subs_dict,
54-
strip_pysb,
5554
toposort_symbols,
5655
unique_preserve_order,
5756
)
@@ -1136,7 +1135,7 @@ def _generate_symbol(self, name: str) -> None:
11361135
components = sorted(
11371136
components,
11381137
key=lambda x: int(
1139-
str(strip_pysb(x.get_sym())).replace(
1138+
x.get_id().replace(
11401139
"observableParameter", ""
11411140
)
11421141
),
@@ -1145,7 +1144,7 @@ def _generate_symbol(self, name: str) -> None:
11451144
components = sorted(
11461145
components,
11471146
key=lambda x: int(
1148-
str(strip_pysb(x.get_sym())).replace(
1147+
x.get_id().replace(
11491148
"noiseParameter", ""
11501149
)
11511150
),
@@ -1214,8 +1213,8 @@ def _generate_symbol(self, name: str) -> None:
12141213
[
12151214
[
12161215
sp.Symbol(
1217-
f"s{strip_pysb(tcl.get_sym())}__"
1218-
f"{strip_pysb(par.get_sym())}",
1216+
f"s{tcl.get_id()}__"
1217+
f"{par.get_id()}",
12191218
real=True,
12201219
)
12211220
for par in self._parameters

0 commit comments

Comments
 (0)