mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-26 13:37:17 +08:00
Make mean boundary RAG testing more robust
This commit is contained in:
@@ -211,5 +211,7 @@ def test_rag_boundary():
|
||||
labels[8:, 8:] = 4
|
||||
|
||||
g = graph.rag_boundary(labels, edge_map, connectivity=1)
|
||||
assert len(g.nodes()) == 4
|
||||
assert len(g.edges()) == 4
|
||||
assert set(g.nodes()) == set([1, 2, 3, 4])
|
||||
assert set(g.edges()) == set([(1, 2), (1, 3), (2, 4), (3, 4)])
|
||||
assert g[1][3]['weight'] == 0.25
|
||||
assert g[2][4]['weight'] == 0.34375
|
||||
|
||||
Reference in New Issue
Block a user