perhaps this SO page will help: https://stackoverflow.com/questions/36314035/force-sympy-to-keep-the-order-of-terms
On Wednesday, May 5, 2021 at 2:59:18 AM UTC-5 thomas...@gmail.com wrote: > In this task, I am analyzing partial sums of power series. At one place, I > call > exp = collect(expand(exp), m, factor) > The expression exp is a partial sum of a power series in powers of m. > After this call, I have one more manipulation and then I print the results. > For the printout, I would like to see the power series in ascending powers > of m > 1-2m/3+7m**2/18 > but collect returns descending powers > 7m**2/18-2m/3+1 > I was hoping I could call collect and pass a parameter for the order of > the output, but didn't find anything. > Does anyone have a recommendation? > -- 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 sympy+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/357398b2-1e3c-49e0-a705-70e354bc3d49n%40googlegroups.com.