Ask Your Question
1

Problem with solution_dict=True

asked 2014-10-09 15:48:51 +0200

jllb gravatar image

updated 2023-01-09 23:59:34 +0200

tmonteil gravatar image
var('x y')
solve(x + y, [x, y], solution_dict=True)

yields AttributeError: 'list' object has no attribute 'left'

Is this a bug?

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
3

answered 2014-10-10 07:58:27 +0200

This looks like a bug introduced in Sage 6.3. It's been reported at http://trac.sagemath.org/ticket/17128.

edit flag offensive delete link more

Comments

There is now a fix posted there. If you can, please test it.

John Palmieri gravatar imageJohn Palmieri ( 2014-10-10 17:02:44 +0200 )edit

And this fix will be in Sage 6.4!

kcrisman gravatar imagekcrisman ( 2014-11-11 16:56:23 +0200 )edit
0

answered 2014-10-10 06:12:04 +0200

god.one gravatar image

Hi, could you please tell us which version of sage you are using? Going to sagenb.org

var('x y')
sol=solve(x + y, [x, y], solution_dict=True)
sol

gives

[{x: -y}]

which still surprises me since the system of equation is more than incomplete.

edit flag offensive delete link more

Comments

Version is 6.3. Seems to me sagenb is using an old version without the bug.

jllb gravatar imagejllb ( 2014-10-10 12:06:39 +0200 )edit
0

answered 2014-10-10 09:45:07 +0200

ndomes gravatar image

A workaround (tested with Sage Cell Server):

var('x y')
sol = []
for v in [x,y]:
    sol +=  solve(x + y == 0,v, solution_dict=True)
sol

gives

[{x: -y}, {y: -x}]
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-10-09 15:48:51 +0200

Seen: 983 times

Last updated: Oct 10 '14