Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parse_mathematica cannot handle greek letters #26642

Open
SirNate0 opened this issue May 30, 2024 · 1 comment
Open

parse_mathematica cannot handle greek letters #26642

SirNate0 opened this issue May 30, 2024 · 1 comment

Comments

@SirNate0
Copy link

from sympy.parsing.mathematica import parse_mathematica
parse_mathematica('α')

Output

Traceback (most recent call last):

  File ~/.local/lib/python3.10/site-packages/IPython/core/interactiveshell.py:3508 in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)

  Cell In[71], line 1
    parse_mathematica('α')

  File ~/.local/lib/python3.10/site-packages/sympy/parsing/mathematica.py:82 in parse_mathematica
    return parser.parse(s)

  File ~/.local/lib/python3.10/site-packages/sympy/parsing/mathematica.py:535 in parse
    s3 = self._from_tokens_to_fullformlist(s2)

  File ~/.local/lib/python3.10/site-packages/sympy/parsing/mathematica.py:740 in _from_tokens_to_fullformlist
    return self._parse_after_braces(stack[0])

  File ~/.local/lib/python3.10/site-packages/sympy/parsing/mathematica.py:909 in _parse_after_braces
    raise SyntaxError("unable to create a single AST for the expression")

  File <string>
SyntaxError: unable to create a single AST for the expression
@asmeurer
Copy link
Member

What version of SymPy are you using? For me this returns a symbol named α in SymPy 1.12 and master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants