From 843d2d11603c0fdb21283d9c83ecce379d71de02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Boulogne?= Date: Sun, 13 Jan 2013 17:47:59 +0100 Subject: [PATCH] remove brackets --- skimage/draw/_draw.pyx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/skimage/draw/_draw.pyx b/skimage/draw/_draw.pyx index 2576c861..904c3f82 100644 --- a/skimage/draw/_draw.pyx +++ b/skimage/draw/_draw.pyx @@ -289,7 +289,7 @@ def ellipse_perimeter(int cy, int cx, int yradius, int xradius): """ # If both radii == 0, return the center # to avoid infinite loop in 2nd set - if (xradius == 0 and yradius == 0): + if xradius == 0 and yradius == 0: return np.array(cy), np.array(cx) # a and b are xradius an yradius @@ -312,14 +312,14 @@ def ellipse_perimeter(int cy, int cx, int yradius, int xradius): cdef int xchange = yradius * yradius * (1 - 2 * xradius) cdef int ychange = xradius * xradius - while(xstop > ystop): + while xstop > ystop: px.extend([x, -x, -x, x]) py.extend([y, y, -y, -y]) y += 1 ystop += twoasquared err += ychange ychange += twoasquared - if ((2 * err + xchange) > 0): + if (2 * err + xchange) > 0: x -= 1 xstop -= twobsquared err += xchange @@ -335,14 +335,14 @@ def ellipse_perimeter(int cy, int cx, int yradius, int xradius): xchange = yradius * yradius ychange = xradius * xradius * (1 - 2 * yradius) - while(xstop <= ystop): + while xstop <= ystop: px.extend([x, -x, -x, x]) py.extend([y, y, -y, -y]) x += 1 xstop += twobsquared err += xchange xchange += twobsquared - if ((2 * err + ychange) > 0): + if (2 * err + ychange) > 0: y -= 1 ystop -= twoasquared err += ychange