Skip to content

Commit

Permalink
Sort masked indices for fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Blunde1 committed Jul 22, 2024
1 parent c83785b commit e3c7b72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ert/config/field.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def adjust_graph_for_masking(G: nx.Graph, mask_indices: npt.NDArray[np.int_]):
Returns:
- The adjusted graph
"""
for removed_count, i in enumerate(mask_indices):
for removed_count, i in enumerate(np.sort(mask_indices)):
# Adjust i for the number of removals to get the current index in the graph
current_index = i - removed_count
neighbors = list(G.neighbors(current_index))
Expand Down

0 comments on commit e3c7b72

Please sign in to comment.