From acf92f5525234c208a483f4f7154058cd6c6036a Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner <inform@tiker.net> Date: Sun, 29 Oct 2017 13:15:03 +0100 Subject: [PATCH] Placate new Flake8 --- meshmode/mesh/generation.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/meshmode/mesh/generation.py b/meshmode/mesh/generation.py index c19c3dd1..64968fe4 100644 --- a/meshmode/mesh/generation.py +++ b/meshmode/mesh/generation.py @@ -395,12 +395,12 @@ def generate_icosahedron(r, order): top_point = 5 tris = [] - l = len(top_ring) - for i in range(l): - tris.append([top_ring[i], top_ring[(i+1) % l], top_point]) - tris.append([bottom_ring[i], bottom_point, bottom_ring[(i+1) % l], ]) - tris.append([bottom_ring[i], bottom_ring[(i+1) % l], top_ring[i]]) - tris.append([top_ring[i], bottom_ring[(i+1) % l], top_ring[(i+1) % l]]) + m = len(top_ring) + for i in range(m): + tris.append([top_ring[i], top_ring[(i+1) % m], top_point]) + tris.append([bottom_ring[i], bottom_point, bottom_ring[(i+1) % m], ]) + tris.append([bottom_ring[i], bottom_ring[(i+1) % m], top_ring[i]]) + tris.append([top_ring[i], bottom_ring[(i+1) % m], top_ring[(i+1) % m]]) vertices *= r/la.norm(vertices[:, 0]) -- GitLab