Le dimanche 22 mai 2011 à 14:38 +0545, Chris Smith a écrit : > > I think that sets make more sense, too, but it's useful to > have the > variables in the output, and dicts are the easiest way to > handle them. > What about using sets of frozen dicts? Frozen dicts aren't > builtins > but there are simple free implementations (I just adapted one > from > http://code.activestate.com/recipes/414283/), that work in all > python > versions. They can easily be converted to/from dicts and subs > should > be able to use them directly. > > The way 1694ms is designed now, the solve routine is just a wrapper to > _solve (which contains the core solving routines). It would be easy to > add keywords to control the output in any variety of ways. _solve will > return [(x1, x2, ...), (v11, v12, ..), (v21, v22, ...) ...] where the > xi are the symbols and vij is the jth solution for variable i; solve > can then remap this to whatever we decide upon. > But this can't generalise to infinite solution sets. Why do you want to repeat part of the input (the variables) in the output? In solve(Eq(x**2, 1), x), x should be a bound variable. If you put it in the output, you make it free.
-- 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.