From 9b9730b058c8f1b11cfcf2fe1438b2c672874e28 Mon Sep 17 00:00:00 2001 From: Juan Nunez-Iglesias Date: Mon, 12 Jan 2015 15:59:38 +1100 Subject: [PATCH] Specify mode for mark_boundary tests --- skimage/segmentation/tests/test_boundaries.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/skimage/segmentation/tests/test_boundaries.py b/skimage/segmentation/tests/test_boundaries.py index 7b837f4e..0992fa74 100644 --- a/skimage/segmentation/tests/test_boundaries.py +++ b/skimage/segmentation/tests/test_boundaries.py @@ -41,7 +41,8 @@ def test_mark_boundaries(): [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]) - result = mark_boundaries(image, label_image, color=white).mean(axis=2) + marked = mark_boundaries(image, label_image, color=white, mode='thick') + result = np.mean(marked, axis=-1) assert_array_equal(result, ref) ref = np.array([[0, 2, 2, 2, 2, 2, 2, 2, 0, 0], @@ -54,8 +55,9 @@ def test_mark_boundaries(): [2, 2, 1, 1, 1, 1, 1, 2, 2, 0], [0, 2, 2, 2, 2, 2, 2, 2, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]) - result = mark_boundaries(image, label_image, color=white, - outline_color=(2, 2, 2)).mean(axis=2) + marked = mark_boundaries(image, label_image, color=white, + outline_color=(2, 2, 2), mode='thick') + result = np.mean(marked, axis=-1) assert_array_equal(result, ref)