From 6d103b5a7ff96f6f40598a5cd1382c1b57201531 Mon Sep 17 00:00:00 2001 From: Stefan van der Walt Date: Sun, 31 Jan 2016 09:43:28 -0800 Subject: [PATCH] Revert back usage of full_like to support older numpy --- skimage/draw/draw.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/skimage/draw/draw.py b/skimage/draw/draw.py index 862e4c3c..1624b115 100644 --- a/skimage/draw/draw.py +++ b/skimage/draw/draw.py @@ -179,8 +179,10 @@ def set_color(img, coords, color, alpha=1): img.shape[-1])) if np.isscalar(alpha): - alpha = np.full_like(rr, alpha, dtype=float) - + # Can be replaced by ``full_like`` when numpy 1.8 becomes + # minimum dependency + alpha = np.ones_like(rr) * alpha + rr, cc, alpha = _coords_inside_image(rr, cc, img.shape, val=alpha) alpha = alpha[..., np.newaxis]