Skip to content

Commit

Permalink
SBML import - faster _get_list_of_species_references (#2094)
Browse files Browse the repository at this point in the history
  • Loading branch information
dweindl authored May 17, 2023
1 parent 52a1331 commit d0a12c4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions python/sdist/amici/sbml_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -2535,11 +2535,11 @@ def _get_list_of_species_references(
ListOfSpeciesReferences
"""
return [
reference
for element in sbml_model.all_elements
if isinstance(element, sbml.ListOfSpeciesReferences)
for reference in element
]
reference
for reaction in sbml_model.getListOfReactions()
for reference in
itt.chain(reaction.getListOfReactants(), reaction.getListOfProducts(), reaction.getListOfModifiers())
]


def replace_logx(math_str: Union[str, float, None]) -> Union[str, float, None]:
Expand Down

0 comments on commit d0a12c4

Please sign in to comment.