Skip to content

Commit

Permalink
fix error in transition matirx function
Browse files Browse the repository at this point in the history
  • Loading branch information
annastacy3 committed May 12, 2024
1 parent f876bf8 commit befac46
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions fears/utils/plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -959,10 +959,9 @@ def gen_transition_matrix(p, conc=10**0, fit_land=None):
j for j in range(N) if genotypes[j][1] > fitness_i and bin(i ^ j).count('1') == 1
]

if i == 0 or i == 15:
if len(more_fit_neighbors) == 0:
transition_matrix[i, i] = 1
continue # Skip further processing for this genotype
if len(more_fit_neighbors) == 0:
transition_matrix[i, i] = 1
continue # Skip further processing for this genotype

if more_fit_neighbors:
prob_per_neighbor = 1 / len(more_fit_neighbors)
Expand Down

0 comments on commit befac46

Please sign in to comment.