Error in linalg.svd for large matrix
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Atlas |
Unknown
|
Unknown
|
|||
SciPy |
Invalid
|
Unknown
|
|||
atlas3 (Ubuntu) |
Incomplete
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: python-scipy
When calculating a kernel, k, of a matrix A, then the matrix product A.k _must_ (by definition) = 0 (ie the zero matrix) .
Svd can be used to calculate a kernel with the following function:
def null(A,tol=1e-8):
"orthogonal nullspace, elements are floats"
v,i = PosOfFirst(
if i == -1:
i = len(w)
return scipy.transpose
This can readily be tested thus:
def TestNull(a):
k = null(A.A,1e-8)
zeroes = mul(a,k)
print "max=", max(max(zeroes)), "min=", min(min(zeroes))
The max and min values should be smaller than (or at least the same order of maginitude as) tol.
Results on various platforms for the same matrix are as follows:
opteron/warty max= 3.62882467131e-16 min= -3.61473004307e-16 GOOD
pentium/dapper max= 0.109976286782 min= -0.0770718487184 BAD
AMD64/dapper max= 0.0599265087162 min= -0.13143867524 BAD
athlon/dapper max= 2.28048070053e-16 min= -4.583786292e-16 GOOD (but weird eh ?)
pentium/edgy max= 2.28048070053e-16 min= -4.583786292e-16 GOOD
The matrix is quite large (702x635) but well conditioned.
Not all matrices of comparable size exhibit the same problem.
All package configurations are defalt.
The problem couldn't be replicated in octave (which probably lets linpack et al of the hook).
The test script and matrix can be found here:
http://
Upgrading to edgy isn't really a starter (LTS matter to me).
From my POV this is a serious problem, and I'll be happy to offer any further info,
however I'm away from the computer until wednesday so I'll not be able to respond before then.
/best/*
Mark
Changed in scipy: | |
status: | Unknown → New |
Changed in python-scipy: | |
status: | Incomplete → Confirmed |
Changed in scipy: | |
status: | New → Invalid |
PS it's not the value of tol that's causing the problem.
Now I've seen the "Attachment" button, SciTest.tgz contains the test script and matrix.