def parse_gens(s): r""" Converts projective coordinates to affine coordinates for generator """ fulllist = [] for g in s: g1 = g.replace('(', ' ').replace(')', ' ').split(':') fulllist.append((eval(g1[0]), eval(g1[1]))) return fulllist
def parse_gens(s): r""" Converts projective coordinates to affine coordinates for generator """ fulllist=[] for g in s: g1=g.replace('(', ' ').replace(')',' ').split(':') fulllist.append((eval(g1[0]),eval(g1[1]))) return fulllist
def parse_gens(s): r""" Converts projective coordinates to affine coordinates for generator """ fulllist = [] for g in s: g1 = g.replace('(', ' ').replace(')', ' ').split(':') x, y, z = [ZZ(str(c)) for c in g1] fulllist.append((x / z, y / z)) return fulllist