Skip to content

Commit

Permalink
Handle nan usage in initials
Browse files Browse the repository at this point in the history
  • Loading branch information
bgyori committed Oct 4, 2024
1 parent 70cb8ad commit fe0002d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mira/sources/sbml/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,10 @@ def _lookup_concepts_filtered(species_ids) -> List[Concept]:
# initial_concentration is still a float value (even if not
# defined in the XML) with value 0.0. So we have to do a more complex
# check here.
init_amount_falsy = not species.initial_amount
init_conc_falsy = not species.initial_concentration
init_amount_falsy = (not species.initial_amount) \
or math.isnan(species.initial_amount)
init_conc_falsy = (not species.initial_concentration) \
or math.isnan(species.initial_concentration)
if init_conc_falsy and not init_amount_falsy:
init_value = species.initial_amount
elif not init_conc_falsy:
Expand Down

0 comments on commit fe0002d

Please sign in to comment.