Hi, I am interested in determining if a matrix is singular or "nearly singular" - very ill conditioned. The problem occurs in structural engineering applications.
My OS is kubuntu 10.10 (32 bit) Python 2.6.6 numpy and numpy.linalg binaries from ubuntu repositories. The attached tar ball has a little CLI script that generates singular or near singular matrices (because of the inevitable roundoffs) for matrices with elements from sequence 1, 2, 3, 4 etc. The dimension of matrix nn can be passed as command line parameter via sys.argv[1] . If argv[1] does not exist, the 5x5 default matrix is used. for nn = 3 and 4 numpy does not raise an exception for nn = 5 it does raise an exception for nn = 6, 7 np not raises exception for nn = 8 np does raise exception for nn = 9 np does not raise exception for higher nn values np mostly raises the exception, but for nn = 23 and nn=120 it does NOT raise the exception. It is worht noting that in practical problems of engineering analyisis the ill conditioned matrix is not "exact" - there always are approximations and roundoff errors. So my question is: how can one reliably detect singularity (or near singularity) and raise an exception? Many thanks for your attention, Al. -- Algis http://akabaila.pcug.org.au/StructuralAnalysis.pdf
inversion.tar.gz
Description: application/compressed-tar
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion