Hi, I am using solve to solve higher order simultaneous equations in two variables. solve is able to do that, however I have not been able to convert the results to int or float. Specifically I did :
>>> from sympy import Symbol >>> A=solve((x**2 - 1 + y**2 - 2*x*y-6,3*x**2 + 4*y-2),x,y) What A looks like can be seen at http://pastebin.com/abWtaxWG (didn't want to paste a large chunk of text that contains the fractions). On doing the following, I get an error: >>> A[0] + 1 Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: can only concatenate tuple (not "int") to tuple >From what I understand (and i am new to sympy), the results in A are nicely formatted and are of the type tuple hence this does not work. But what can I do to convert them to float. Also, in general can you comment on how good solve is. I am evaluating whether to use solve against fsolve. Since fsolve solves multinomial roots by optimization it can get into local minimas IMO. However, will using solve from sympy result in a smaller set of problems which can be solved. Many thanks M -- 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.
