Skip to content

Commit

Permalink
Fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanmg committed Feb 16, 2022
1 parent 2623d32 commit 637366f
Showing 1 changed file with 22 additions and 5 deletions.
27 changes: 22 additions & 5 deletions python/amici/conserved_moieties.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,30 @@ def _qsort(
_qsort(k, centre + 1, order, pivots)
_qsort(centre, km, order, pivots)

def _helper(num_species, pivots, order, matrix, matrix2, MAX=1e9):
def _helper(
num_species: int,
pivots: Sequence[int],
order: MutableSequence[int],
matrix: List[List[int]],
matrix2: List[List[float]],
MAX=1e9
) -> None:
"""Helper
TODO: doc string, type hints
Helper method
:param num_species:
number of involved metabolites
:param pivots:
pivots for GE
:param order:
ordering of the elements
:param matrix:
coefficients
:param matrix2:
coefficients
"""
for j in range(num_species - 1):
for j in range(num_species):
if pivots[order[j + 1]] == pivots[order[j]] != MAX:
min1 = MAX
if len(matrix[order[j]]) > 1:
Expand Down

0 comments on commit 637366f

Please sign in to comment.