From c6b5d0966973c64f28d33581f5940a34f737946f Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Tue, 29 Mar 2011 17:10:12 -0400 Subject: [PATCH] Sketch.solve(): explicitly initialize vars to 0.0 --- Sketch.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Sketch.py b/Sketch.py index 3e23a18..5ec5825 100644 --- a/Sketch.py +++ b/Sketch.py @@ -30,6 +30,10 @@ class Sketch(object): varid_to_shape_var.append(shape_var) C = empty((len(equations), len(shape_vars))) d = empty(len(equations)) + for row in range(len(equations)): + for col in range(len(shape_vars)): + C[row][col] = 0.0 + d[row] = 0.0 for i in range(len(equations)): e = equations[i] coeffs = e[0]