Skip to content

Commit

Permalink
Fix filter nodes parents bug (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoOkuma authored Dec 22, 2022
1 parent bdb6f03 commit 4221d5a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ultrack/core/export/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,6 @@ def _filter_nodes_by_per_time_point(
LOG.info(f"Removing nodes {removed_ids} at time {time}")

df = df.drop(removed_ids)
df.loc[df["parent_id"].isin(removed_ids), "parent_id"] = NO_PARENT

return df

Expand Down Expand Up @@ -427,4 +426,7 @@ def filter_nodes_generic(
)
)

orphan = np.logical_not(df["parent_id"].isin(df.index))
df.loc[orphan, "parent_id"] = NO_PARENT

return df

0 comments on commit 4221d5a

Please sign in to comment.