Hi all, We should take care of using linalg.inv blindly (test_inv.py). So how can we improve the behaviour of linalg.solve, linalg.lu, linalg.inv etc. with respect to "nearly" singular matrices (floating point arithmetic) ? Any pointer would be appreciated. Is it possibe to add the condition number to the output of linalg.solve, linalg.inv, ... ? For example linalg.lstsq returns the singular values. lstsq(a, b, cond=None, overwrite_a=0, overwrite_b=0) lstsq(a, b, cond=None, overwrite_a=0, overwrite_b=0) -> x,resids,rank,s Return least-squares solution of a * x = b. Inputs: a -- An M x N matrix. b -- An M x nrhs matrix or M vector. cond -- Used to determine effective rank of a. Outputs: x -- The solution (N x nrhs matrix) to the minimization problem: 2-norm(| b - a * x |) -> min resids -- The residual sum-of-squares for the solution matrix x (only if M>N and rank==N). rank -- The effective rank of a. s -- Singular values of a in decreasing order. The condition number of a is abs(s[0]/s[-1]). Nils
participants (1)
-
Nils Wagner