I've made modifications in https://github.com/sympy/sympy/pull/267
When I run the matrices.txt file alone all tests pass. When I run the full
doctest suite I get the failure below for QR decomposition. When I shut
caching off and run the suite, it passes. How can caching give a wrong
answer? It's not just different, it's wrong as shown below.
**********************************************************************
File "c:\documents and settings\chris\sympy\doc\src\modules\matrices.txt",
line
374, in matrices.txt
Failed example:
Q
Expected:
[ ___ ___ ___]
[\/ 6 -\/ 3 -\/ 2 ]
[----- ------ ------]
[ 6 3 2 ]
[ ]
[ ___ ___ ___ ]
[\/ 6 -\/ 3 \/ 2 ]
[----- ------ ----- ]
[ 6 3 2 ]
[ ]
[ ___ ___ ]
[\/ 6 \/ 3 ]
[----- ----- 0 ]
[ 3 3 ]
Got:
[ ___ ___]
[\/ 6 -11*\/ 2 ]
[----- 2/3 ---------]
[ 6 18 ]
[ ]
[ ___ ___ ]
[\/ 6 -5*\/ 2 ]
[----- 2/3 -------- ]
[ 6 18 ]
[ ]
[ ___ ___ ]
[\/ 6 -2*\/ 2 ]
[----- 1/3 -------- ]
[ 3 9 ]
**********************************************************************
File "c:\documents and settings\chris\sympy\doc\src\modules\matrices.txt",
line
389, in matrices.txt
Failed example:
R
Expected:
[ ___ ]
[ ___ 4*\/ 6 ___]
[\/ 6 ------- 2*\/ 6 ]
[ 3 ]
[ ]
[ ___ ]
[ \/ 3 ]
[ 0 ----- 0 ]
[ 3 ]
[ ]
[ ___ ]
[ 0 0 \/ 2 ]
Got:
[ ___ ]
[ ___ 4*\/ 6 ___]
[\/ 6 ------- 2*\/ 6 ]
[ 3 ]
[ ]
[ 0 1 4 ]
[ ]
[ ___]
[ 0 0 3*\/ 2 ]
**********************************************************************
1 items had failures:
2 of 97 in matrices.txt
***Test Failed*** 2 failures.
doc\src\modules\matrices.txt [97]
[2]
This wouldn't be so bad, but Q*R doesn' even equal the original matrix, giving
h[2] >>> pprint(Q)
[ ___ ___]
[\/ 6 -11*\/ 2 ]
[----- 2/3 ---------]
[ 6 18 ]
[ ]
[ ___ ___ ]
[\/ 6 -5*\/ 2 ]
[----- 2/3 -------- ]
[ 6 18 ]
[ ]
[ ___ ___ ]
[\/ 6 -2*\/ 2 ]
[----- 1/3 -------- ]
[ 3 9 ]
h[2] >>> pprint(R)
[ ___ ]
[ ___ 4*\/ 6 ___]
[\/ 6 ------- 2*\/ 6 ]
[ 3 ]
[ ]
[ 0 1 4 ]
[ ]
[ ___]
[ 0 0 3*\/ 2 ]
h[2] >>> Q*R
[1, 2, 1]
[1, 2, 3]
[2, 3, 4]
Q*R should be
[1, 1, 1]
[1, 1, 3]
[2, 3, 4]
Does anyone have any idea what the problem might be? I don't even
know how to go about debuging this?
/c
--
You received this message because you are subscribed to the Google Groups
"sympy" 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?hl=en.