Skip to content

Commit

Permalink
Small code polish
Browse files Browse the repository at this point in the history
  • Loading branch information
jannisteunissen committed Oct 16, 2023
1 parent 09ef253 commit 2cd76fd
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tools/sensitivity_analyze_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,8 @@
with open(base_name + '_reactions.txt', 'r') as f:
reactions_list = [x.strip() for x in f.readlines() if x.strip()]

j = 0
ix_sort = np.argsort(effect_magnitudes)[::-1]
for i in ix_sort:
for n, i in enumerate(ix_sort):
ix = reaction_ix[i]
j += 1
print(f'{j:<6} R{ix:<6} {reactions_list[ix-1]:40} {effect_magnitudes[i]:<15.8f}')
print(f'{n+1:<6} R{ix:<6} {reactions_list[ix-1]:40} ' +
f'{effect_magnitudes[i]:<15.8f}')

0 comments on commit 2cd76fd

Please sign in to comment.