Merge pull request #1785 from pratapvardhan/colordir

MNT: Remove redundant return from gray2rgb
This commit is contained in:
Juan Nunez-Iglesias
2015-11-16 19:53:58 +11:00
2 changed files with 2 additions and 2 deletions
-2
View File
@@ -768,8 +768,6 @@ def gray2rgb(image, alpha=None):
else:
return np.concatenate(3 * (image,), axis=-1)
return image
else:
raise ValueError("Input image expected to be RGB, RGBA or gray.")
+2
View File
@@ -439,6 +439,8 @@ def test_gray2rgb():
assert_equal(y.shape, (3, 1, 3))
assert_equal(y.dtype, x.dtype)
assert_equal(y[..., 0], x)
assert_equal(y[0, 0, :], [0, 0, 0])
x = np.array([[0, 128, 255]], dtype=np.uint8)
z = gray2rgb(x)