I am trying to sympify a string like these

    str1="a^0_0"
    ns={}
    ns['a^0_0']=Symbol('a^0_0')
    pprint(sympify(str1,locals=ns))

But I get the following error

    Traceback (most recent call last):
      File "cuaterniones_basic.py", line 114, in <module>
        pprint(sympify(str1,locals=ns))
      File "/usr/local/lib/python2.7/dist-packages/sympy/core/sympify.py", 
line 356, in sympify
        raise SympifyError('could not parse %r' % a, exc)
    sympy.core.sympify.SympifyError: Sympify of expression 'could not parse 
u'a^0_0'' failed, because of exception being raised:
    SyntaxError: invalid syntax (<string>, line 1

How can get the symbol I want?

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/38e49337-06a6-4a5f-9d97-8a64f915c688%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to