Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
dweindl committed Feb 20, 2024
1 parent 2cf59c0 commit 2f68856
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/sdist/amici/de_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -1191,8 +1191,9 @@ def get_rate(symbol: sp.Symbol):
topo_exprs = toposort_symbols(
dict(zip(self.sym("w"), self.eq("w")))
)
old_syms = tuple(self._syms["w"])
topo_expr_syms = tuple(topo_exprs.keys())
new_order = [topo_expr_syms.index(s) for s in self.sym("w")]
new_order = [old_syms.index(s) for s in topo_expr_syms]
self._expressions = [self._expressions[i] for i in new_order]
self._syms["w"] = sp.Matrix(topo_expr_syms)
self._eqs["w"] = sp.Matrix(list(topo_exprs.values()))
Expand Down

0 comments on commit 2f68856

Please sign in to comment.