mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-18 12:30:14 +08:00
remove self loops in rag
This commit is contained in:
@@ -115,7 +115,8 @@ def _add_edge_filter(values, graph):
|
||||
values = values.astype(int)
|
||||
current = values[0]
|
||||
for value in values[1:]:
|
||||
graph.add_edge(current, value)
|
||||
if value != current:
|
||||
graph.add_edge(current, value)
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user