Hi all,

During a performance pass on some code that makes heavy use of sympy symbol 
objects, I noticed expr.as_coeff_exponent() showing up in my profiles. I'm 
using this function to multiplicatively factor a Symbol object representing 
physical dimensions. Given a symbol x/y, I'm looking for a way to compute 
that this is equivalent to x**1 * y**-1

Here x and y are members of a "base" set of Symbols I know all other 
symbols must be composed through various multiplicative factors.

I'm curious if there is a more performant way to implement this function, 
given that I know I'm passing it instances of `Mul`.

Thanks for your help!

-Nathan

-- 
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 http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/f85cb699-747f-41f4-a386-64a39fde2d0b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to