Skip to content
Snippets Groups Projects
Commit bac3de6a authored by pswain's avatar pswain
Browse files

bug(apply_merges): merges implementing on more than valid_merges

parent 19e676d9
No related branches found
No related tags found
No related merge requests found
...@@ -130,8 +130,8 @@ def apply_merges(data: pd.DataFrame, merges: np.ndarray): ...@@ -130,8 +130,8 @@ def apply_merges(data: pd.DataFrame, merges: np.ndarray):
# merge tracks # merge tracks
if valid_merges.any(): if valid_merges.any():
to_merge = data.loc[valid_indices].copy() to_merge = data.loc[valid_indices].copy()
left_indices = merges[:, 0] left_indices = merges[valid_merges, 0]
right_indices = merges[:, 1] right_indices = merges[valid_merges, 1]
# join left track with right track # join left track with right track
for left_index, right_index in zip(left_indices, right_indices): for left_index, right_index in zip(left_indices, right_indices):
to_merge.loc[tuple(left_index)] = join_two_tracks( to_merge.loc[tuple(left_index)] = join_two_tracks(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment