The output from solve for algebraic equations is not usable without testing 
output because of the variable types of output. 

CASE 1: If no variables are given we get the following from the input:
* univariate equation -> list of values
>>> solve(x**2 - 4)
[-2, 2]
* multivariate equation -> list of one or more dictionaries
>>> solve(x**2 - y)
[{y: x**2}]

CASE 2: If variable(s) are given we get
* tuples of solutions
>>> solve([x**2-y],x)
[(-sqrt(y),), (sqrt(y),)]
* dictionary for single solution
>>> solve([x-y],x)
{x: y}

Although the dict=True or set=True will give a standard output, can we at 
least unify the case for when variables are given so we always get a list 
of one or more dictionaries? So the above would be `[{x: -sqrt(y)}, {x: 
sqrt(y)}]` and `[{x: y}]`, respectively. This would then make `solve` 
always give a list of a) values for a univariate expression, b) a list of 
one or more dictionaries for every other case.  (Case (a) will give a list 
of dictionaries if `dict=True`.)

/c

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/c391d370-5d64-4b94-ae15-a56901bbb219n%40googlegroups.com.

Reply via email to