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