So, I have yet another simplification question. What is the correct way to factor a minus one out of this:
In [108]: type(x2_tf_ds) Out[108]: <class 'sympy.core.mul.Mul'> In [109]: x2_tf_ds Out[109]: -Gc*k/(-Gc*k - k*m1*s**2 - k*m2*s**2 - m1*m2*s**4) This didn't work: In [110]: sympy.simplify(x2_tf_ds) Out[110]: -Gc*k/(-Gc*k - k*m1*s**2 - k*m2*s**2 - m1*m2*s**4) This works, and is fine with me. But I wonder if there is a better way: In [111]: a,b = x2_tf_ds.as_numer_denom() In [112]: -a/-b Out[112]: Gc*k/(Gc*k + k*m1*s**2 + k*m2*s**2 + m1*m2*s**4) Thanks, Ryan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sympy?hl=en -~----------~----~----~----~------~----~------~--~---