I observed that solve behaves inconsistently in the following regards:
sage: solve([x==1,x==-1],x)
[]
(this is as expected)
However:
solve([x==1,x==-1],x, solution_dict=True)
produces an error message. Easy to live with, but I was scared when I
first saw it :-).
It should be easy to correct, as the message reveals that the function
is trying to look at the 0-th
element of an empty list ...
/data/local/sage/local/lib/python2.6/site-packages/sage/symbolic/
relation.pyc in solve(f, *args, **kwds)
672 sol_list = string_to_list_of_solutions(repr(s))
673 if 'solution_dict' in kwds and
kwds['solution_dict']==True:
--> 674 if isinstance(sol_list[0], list):
675 sol_dict=[dict([[eq.left(),eq.right()] for eq
in solution])
676 for solution in sol_list]
--
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/sage-support
URL: http://www.sagemath.org