From b3759c8a2f0c071eb9e143ebcbac0cdd2b85d739 Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 27 Sep 2011 23:38:57 +0200 Subject: [PATCH] bug: color convertion. make tests arrays float. --- scikits/image/color/tests/test_colorconv.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scikits/image/color/tests/test_colorconv.py b/scikits/image/color/tests/test_colorconv.py index 74cf34fd..e3166781 100644 --- a/scikits/image/color/tests/test_colorconv.py +++ b/scikits/image/color/tests/test_colorconv.py @@ -37,7 +37,7 @@ class TestColorconv(TestCase): colbars = np.array([[1, 1, 0, 0, 1, 1, 0, 0], [1, 1, 1, 1, 0, 0, 0, 0], - [1, 0, 1, 0, 1, 0, 1, 0]]) + [1, 0, 1, 0, 1, 0, 1, 0]]).astype(np.float) colbars_array = np.swapaxes(colbars.reshape(3, 4, 2), 0, 2) colbars_point75 = colbars * 0.75 colbars_point75_array = np.swapaxes(colbars_point75.reshape(3, 4, 2), 0, 2) @@ -144,7 +144,7 @@ class TestColorconv(TestCase): 'RGB', 'nokey') def test_rgb2grey(self): - x = np.array([1, 1, 1]).reshape((1, 1, 3)) + x = np.array([1, 1, 1]).reshape((1, 1, 3)).astype(np.float) g = rgb2grey(x) assert_array_almost_equal(g, 1)