From ba65c3562bdbb5afcea407a9f3b190bd9d4586e9 Mon Sep 17 00:00:00 2001 From: Jonathan Helmus Date: Sat, 11 Jul 2015 17:46:17 -0500 Subject: [PATCH] TST: smaller arrays for bit comparison in test_rank for speed --- skimage/filters/rank/tests/test_rank.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/skimage/filters/rank/tests/test_rank.py b/skimage/filters/rank/tests/test_rank.py index 2db36aa67bf..bb11a170480 100644 --- a/skimage/filters/rank/tests/test_rank.py +++ b/skimage/filters/rank/tests/test_rank.py @@ -282,7 +282,7 @@ def test_compare_8bit_unsigned_vs_signed(): # of dynamic) should be identical # Create signed int8 image that and convert it to uint8 - image = img_as_ubyte(data.camera()) + image = img_as_ubyte(data.camera())[::2, ::2] image[image > 127] = 0 image_s = image.astype(np.int8) with expected_warnings(['sign loss', 'precision loss']): @@ -306,7 +306,7 @@ def test_compare_8bit_vs_16bit(): # filters applied on 8-bit image ore 16-bit image (having only real 8-bit # of dynamic) should be identical - image8 = util.img_as_ubyte(data.camera()) + image8 = util.img_as_ubyte(data.camera())[::2, ::2] image16 = image8.astype(np.uint16) assert_equal(image8, image16)