Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/sage/rings/polynomial/groebner_fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,10 @@
"""

import string
import re
import pexpect
from subprocess import PIPE, Popen

from sage.misc.sage_eval import sage_eval

from sage.structure.sage_object import SageObject
from sage.interfaces.gfan import gfan
from .multi_polynomial_ideal import is_MPolynomialIdeal
Expand Down Expand Up @@ -983,8 +982,9 @@ def weight_vectors(self):
stdin=PIPE, stdout=PIPE, stderr=PIPE)
ans, err = gfan_processes.communicate(input=str_to_bytes(self.gfan()))
ans = bytes_to_str(ans)
ans = sage_eval(ans.replace('{', '').replace('}', '').replace('\n', ''))
return [vector(QQ, x) for x in ans]
vect = re.compile(r"\([0-9,/\s]*\)")
ans = (tup[1:-1].split(',') for tup in vect.findall(ans))
return [vector(QQ, [QQ(y) for y in x]) for x in ans]

def ring(self):
"""
Expand Down