There is linalg.pinv, which computes a pseudoinverse based on SVD that works on all matrices, regardless of the rank of the matrix. It merely approximates A*A.I = I as well as A permits though, rather than being a true inverse, which may not exist.
Anyway, there are no general answers for this kind of thing. In all non-textbook problems I can think of, the properties of your matrix are highly constrained by the problem you are working on; which additional tests are required to check for corner cases thus depends on the problem. Often, if you have found an elegant solution to your problem, no such corner cases exist. In that case, MATLAB is just wasting your time with its automated checks. -- http://mail.python.org/mailman/listinfo/python-list