From c3d40447f80da493e697272197087f3af5e79472 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Sch=C3=B6nberger?= Date: Wed, 2 Oct 2013 16:58:32 +0200 Subject: [PATCH] Remove call to deprecated is_gray function --- skimage/color/colorconv.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/skimage/color/colorconv.py b/skimage/color/colorconv.py index 5d41a063..7562b650 100644 --- a/skimage/color/colorconv.py +++ b/skimage/color/colorconv.py @@ -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.")