Hi,
I have not found a simple way to map a function to a mathematical
expression with sum of items. Is there anything simple to do it ? I
was thinking it would be simples, like "map(expand,expr)" but it
doesn't work.
In the meantime, I have solved this issue with the code :
def mapexpr(self,expr,func):
if isinstance(expr,Add):
return apply(Add,map(func,expr.args))
else:
return func(expr)
Which is used in Integral (http://www.robertocolistete.net/integral/).
Best regards,
Roberto
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.