Remove call to deprecated is_gray function

This commit is contained in:
Johannes Schönberger
2013-10-02 16:58:32 +02:00
parent 5ea79d4301
commit c3d40447f8
+2 -2
View File
@@ -684,9 +684,9 @@ def gray2rgb(image):
"""
if np.squeeze(image).ndim == 3 and image.shape[2] in (3, 4):
return image
elif is_gray(image):
elif image.ndim != 1 and np.squeeze(image).ndim in (1, 2, 3):
image = image[..., np.newaxis]
return np.concatenate((image,)*3, axis=-1)
return np.concatenate(3 * (image,), axis=-1)
else:
raise ValueError("Input image expected to be RGB, RGBA or gray.")