diff --git a/skimage/graph/graph_cut.py b/skimage/graph/graph_cut.py index 7c183689..d6e1d013 100644 --- a/skimage/graph/graph_cut.py +++ b/skimage/graph/graph_cut.py @@ -34,7 +34,6 @@ def threshold_cut(label, rag, thresh): """ to_remove = [(x, y) for x, y, d in rag.edges_iter(data=True) if d['weight'] >= thresh] - rag.remove_edges_from(to_remove) comps = nx.connected_components(rag) diff --git a/skimage/graph/tests/test_rag.py b/skimage/graph/tests/test_rag.py index fdf3fee7..8c28febe 100644 --- a/skimage/graph/tests/test_rag.py +++ b/skimage/graph/tests/test_rag.py @@ -16,10 +16,7 @@ def test_threshold_cut(): labels[50:, :50] = 2 labels[50:, 50:] = 3 - # print labels rag = graph.rag_meancolor(img, labels) - # print "no of edges",rag.number_of_edges() new_labels = graph.threshold_cut(labels, rag, 10) assert new_labels.max() == 2 - # assert False