Skip to content

Commit b2477ea

Browse files
committed
SBML import: Boolean handling
Test. Related to AMICI-dev#2840.
1 parent 08bf630 commit b2477ea

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

python/sdist/amici/sbml_import.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1471,19 +1471,16 @@ def _process_reactions(self):
14711471
self.stoichiometric_matrix[
14721472
species["index"], reaction_index
14731473
] += sign * stoichiometry * species["conversion_factor"]
1474+
14741475
if reaction.isSetId():
14751476
sym_math = self._local_symbols[reaction.getId()]
14761477
else:
14771478
sym_math = self._sympify(
14781479
reaction.getKineticLaw() or sp.Float(0)
14791480
)
14801481

1481-
self.flux_vector[reaction_index] = sym_math.subs(
1482-
{
1483-
BooleanTrue(): sp.Float(1.0),
1484-
BooleanFalse(): sp.Float(0.0),
1485-
}
1486-
)
1482+
self.flux_vector[reaction_index] = sym_math
1483+
14871484
if any(
14881485
str(symbol) in reaction_ids
14891486
for symbol in self.flux_vector[reaction_index].free_symbols

0 commit comments

Comments
 (0)