Sat 2018-05-19 08:32:27 UTC, Ralf Stephan: > There is a function is_unit() in symbolic/units.py, so you just need > to walk the expression tree using the ExpressionTreeWalker class in > symbolic/expression_conversions.py. I would first check for symbol > with ex.is_symbol() which is very fast. See DefiniteSumExpander > for example.
Is there a tutorial about walking the expression tree and doing various operations there? That would be a tutorial I would be happy to study and to recommend in the many occasions when users ask questions which would be best solved by an approach of this kind. Samuel -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.