#20194: expression conversion bug with Sympy functions
-----------------------------+------------------------
       Reporter:  rws        |        Owner:
           Type:  defect     |       Status:  new
       Priority:  major      |    Milestone:  sage-7.2
      Component:  symbolics  |   Resolution:
       Keywords:             |    Merged in:
        Authors:             |    Reviewers:
Report Upstream:  N/A        |  Work issues:
         Branch:             |       Commit:
   Dependencies:             |     Stopgaps:
-----------------------------+------------------------
Description changed by rws:

Old description:

> With the Sympy-1.0 upgrade (#20185)
> {{{
> sage: import sympy
> sage: u = sympy.Function('u'); n = sympy.Symbol('n', integer=True)
> sage: sympy.sympify(3*u(n), evaluate=False)
> NotImplementedError: SymPy function 'u' doesn't exist
> }}}
> which disappears when `3*u(n)` is changed to `u(n)*3` or `u(n)`

New description:

 With the Sympy-1.0 upgrade (#20185)
 {{{
 sage: import sympy
 sage: u = sympy.Function('u'); n = sympy.Symbol('n', integer=True)
 sage: sympy.sympify(3*u(n), evaluate=False)
 /home/ralf/sage/local/lib/python2.7/site-
 packages/sympy-1.0-py2.7.egg/sympy/parsing/sympy_parser.pyc in
 flatten(self, args, func)
     922         result = []
     923         for arg in args:
 --> 924             if isinstance(arg, ast.Call) and arg.func.id == func:
     925                 result.extend(self.flatten(arg.args, func))
     926             else:

 AttributeError: 'Call' object has no attribute 'id'
 }}}
 which disappears when `3*u(n)` is changed to `u(n)*3` or `u(n)`

--

--
Ticket URL: <http://trac.sagemath.org/ticket/20194#comment:1>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" 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/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to