We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5858ca4 commit 7773e94Copy full SHA for 7773e94
src/segmentation_skeleton_metrics/skeleton_metric.py
@@ -754,7 +754,7 @@ def compute_erl(self):
754
755
path_length = gutils.compute_path_length(target_graph)
756
run_lengths = gutils.compute_run_lengths(pred_graph)
757
- wgt = run_lengths / np.sum(run_lengths)
+ wgt = run_lengths / max(np.sum(run_lengths), 1)
758
759
self.erl[swc_id] = np.sum(wgt * run_lengths)
760
self.normalized_erl[swc_id] = self.erl[swc_id] / path_length
0 commit comments