Skip to content

Commit

Permalink
Merge pull request #184 from RazinShaikh/master
Browse files Browse the repository at this point in the history
typo for pi in jsonparser string_to_phase
  • Loading branch information
jvdwetering authored Nov 20, 2023
2 parents 9575125 + fd35527 commit d87356a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyzx/graph/jsonparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def string_to_phase(string: str, g: Union[BaseGraph,'GraphDiff']) -> Union[Fract
return Fraction(0)
try:
s = string.lower().replace(' ', '')
s = re.sub(r'\\?(pi|\u04c0)', '', s)
s = re.sub(r'\\?(pi|\u03c0)', '', s)
if s == '': return Fraction(1)
if s == '-': return Fraction(-1)
if '.' in s or 'e' in s:
Expand Down

0 comments on commit d87356a

Please sign in to comment.