python - Parsing an expression containing N using SymPy -


i parsing expression using sympy , getting following trace:

>>> parse_expr("3n", transformations=transformations)` typeerror: unsupported operand type(s) *: 'integer' , 'function' 

from gather, happens because n seen function parser , not other string. code works fine few other symbols tested.

can explain briefly why happening? there list of keywords or characters cannot parsed using parse_expr?

quoting docs (pitfalls , gotchas):

lastly, recommended not use i, e, s, n, c, o, or q variable or symbol names, used ... numeric evaluation (n() equivalent evalf() )... or better yet, use lowercase letters symbol names. python not prevent overriding default sympy names or functions, careful.


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -