From ea9180f7548766d8552db6caa8ea4bb64318984e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Boulogne?= Date: Thu, 2 Jun 2016 13:38:32 +0200 Subject: [PATCH] more concise writting --- skimage/filters/tests/test_thresholding.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/skimage/filters/tests/test_thresholding.py b/skimage/filters/tests/test_thresholding.py index dae347fa..4891228e 100644 --- a/skimage/filters/tests/test_thresholding.py +++ b/skimage/filters/tests/test_thresholding.py @@ -292,10 +292,7 @@ def test_threshold_minimum(): def test_threshold_minimum_synthetic(): - img = np.zeros((25*25), dtype=np.uint8) - for i in range(25*25): - img[i] = i % 256 - img = np.reshape(img, (25, 25)) + img = np.arange(25*25, dtype=np.uint8).reshape((25, 25)) img[0:9, :] = 50 img[14:25, :] = 250