First time here? Check out the FAQ!

Ask Your Question
1

Problem with solution_dict=True

asked 10 years ago

jllb gravatar image

updated 2 years ago

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?

Preview: (hide)

3 Answers

Sort by » oldest newest most voted
3

answered 10 years ago

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

Preview: (hide)
link

Comments

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

John Palmieri gravatar imageJohn Palmieri ( 10 years ago )

And this fix will be in Sage 6.4!

kcrisman gravatar imagekcrisman ( 10 years ago )
0

answered 10 years ago

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.

Preview: (hide)
link

Comments

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

jllb gravatar imagejllb ( 10 years ago )
0

answered 10 years ago

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}]
Preview: (hide)
link

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: 10 years ago

Seen: 1,388 times

Last updated: Oct 10 '14