From c08d96d2b5738395cc70f5152d88ed8d3b7c4b10 Mon Sep 17 00:00:00 2001 From: Vighnesh Birodkar Date: Mon, 16 Jun 2014 23:03:36 +0530 Subject: [PATCH] Minor Foramtting --- skimage/graph/graph_cut.py | 1 - skimage/graph/tests/test_rag.py | 3 --- 2 files changed, 4 deletions(-) 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