make C square

This commit is contained in:
Josh Holtrop 2011-03-29 19:16:24 -04:00
parent 6fae3f220d
commit fcffa9c760

View File

@ -29,8 +29,9 @@ class Sketch(object):
shape_vars[shape_var] = varid shape_vars[shape_var] = varid
varid += 1 varid += 1
varid_to_shape_var.append(shape_var) varid_to_shape_var.append(shape_var)
C = zeros((len(equations), len(shape_vars))) dim = max(len(equations), len(shape_vars))
d = zeros(len(equations)) C = zeros((dim, dim))
d = zeros(dim)
for i in range(len(equations)): for i in range(len(equations)):
e = equations[i] e = equations[i]
coeffs = e[0] coeffs = e[0]