Skip to content

Commit

Permalink
Fix compartment ordering randomization due to use of set
Browse files Browse the repository at this point in the history
Get rid of all things set()
  • Loading branch information
jsnel committed Aug 29, 2021
1 parent 9dc64af commit 0ff7b04
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions glotaran/analysis/problem_grouped.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,12 @@ def calculate_index_independent_matrices(
self._reduced_matrices[group_label] = combine_matrices(
[self._reduced_matrices[label] for label in group]
)
self._group_clp_labels[group_label] = list(
set(itertools.chain(*(self._matrices[label].clp_labels for label in group)))
)
group_clp_labels = []
for label in group:
for clp_label in self._matrices[label].clp_labels:
if clp_label not in group_clp_labels:
group_clp_labels.append(clp_label)
self._group_clp_labels[group_label] = group_clp_labels

return self._matrices, self._reduced_matrices

Expand Down

0 comments on commit 0ff7b04

Please sign in to comment.