Comment #8 on issue 3493 by [email protected]: bad solution for system of
linear equations
http://code.google.com/p/sympy/issues/detail?id=3493
Try replacing all numbers with symbols
t=Tuple(*eqs)
n=t.atoms(Number)
nd=dict(zip(n, [Dummy() for ni in n]))
t=t.subs(nd)
Now try solve the system
sol=solve(tuple(t),syms,manual=1)
sol
[]
Hmm...no solution, even when the numbers have been written with symbols.
Either there are some numbers that aren't showing up (truncated to zero) or
there isn't a solution for the numbers in the positions where they are.
It might be instructive to look at the Jacobian (CAUTION: shape depends on
the order that syms comes out of set into list; to make canonical, use
ordered(syms))
Matrix(63,1,list(t)).jacobian(Matrix(63,1,list(syms))).print_nonzero('.')
[ XX X X ]
[ X X X X ]
[ XX X ]
[ X X X X X ]
[ XX XX ]
[ X X X X ]
[ XX X ]
[ X X ]
[ X X ]
[ X XX X ]
[ X X X X ]
[ X X X ]
[X X X X ]
[X X ]
[ X X ]
[ X X X ]
[ X X ]
[ X X ]
[ X X X X X ]
[ X X X X ]
[ X X X X ]
[ X X XX ]
[ XXXX ]
[ X ]
[ X X X X X ]
[ X X X ]
[ X XX ]
[ XX X ]
[ X X ]
[ XX ]
[ XX X X ]
[ X X XX ]
[ X ]
[ XX X X X ]
[ X XX X ]
[ X X X X ]
[ X X X X X ]
[ XX X ]
[ X X X ]
[ X X X X X]
[ X X X X ]
[ X X]
[X X X X ]
[X X X X ]
[ X ]
[ X X XX ]
[ X X ]
[ X X ]
[ X XX XX]
[ X X X X ]
[ XX]
[ X X XX X ]
[ X X X X ]
[ X X XX ]
[ X X X ]
[ X X ]
[ X X ]
[ X X X X ]
[ XX XX ]
[ X ]
[ X ]
[ X ]
[ X ]
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" 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-issues?hl=en.