On 30 May 2012 21:53, Chris Smith <[email protected]> wrote: >> How to process the output of solve in code? Is it really the only way >> to check whether it is a list or a dict? Is there a way to force the >> use of dict? If not, what do you think about adding such a flag? > > If you always give a list of Expr and the symbols you want you e.g. > solve(list(eqs), list(syms)) you will get > - a single dictionary if it's linear > - a list of tuples if it's non-linear > - None if there is no solution > - an error if no subset of symbols gave a solution > The most important thing that I learned: If it is a single equation it must be a list! Thanks!
Just to be sure: None means that mathematically there is no solution. Error means that the solver is not smart enough. Right? -- 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.
