From 88a9cb4060ef936eb0afe815bcccf0a02a2e018d Mon Sep 17 00:00:00 2001 From: Alexey Umnov Date: Wed, 17 Sep 2014 20:20:26 +0400 Subject: [PATCH] Added float conversions for python2.x --- skimage/draw/draw.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skimage/draw/draw.py b/skimage/draw/draw.py index f60a67ee..2f03b018 100644 --- a/skimage/draw/draw.py +++ b/skimage/draw/draw.py @@ -9,7 +9,7 @@ def _coords_inside_image(rr, cc, shape): def _ellipse_in_shape(shape, center, radiuses): """Generate coordinates of points within ellipse bounded by shape.""" - y, x = np.ogrid[0:shape[0], 0:shape[1]] + y, x = np.ogrid[0:float(shape[0]), 0:float(shape[1])] cy, cx = center ry, rx = radiuses distances = ((y - cy) / ry) ** 2 + ((x - cx) / rx) ** 2