[Scipy-tickets] [SciPy] #1730: LinAlgError("singular matrix") failed to raise when using linalg.solve()
SciPy Trac
scipy-tickets@scipy....
Sun Sep 30 09:12:47 CDT 2012
#1730: LinAlgError("singular matrix") failed to raise when using linalg.solve()
---------------------------+------------------------------------------------
Reporter: mokchie | Owner: pv
Type: defect | Status: new
Priority: normal | Milestone: Unscheduled
Component: Documentation | Version: 0.9.0
Keywords: |
---------------------------+------------------------------------------------
Changes (by pv):
* owner: somebody => pv
* component: scipy.linalg => Documentation
Comment:
The correct way to check whether a floating-point matrix is singular is to
look at its condition number, using `numpy.linalg.cond`.
The solve routine does not explicitly check the condition number, rather
it assumes the input matrix is not singular. The way to look at floating-
point solution of `A x = b` is that what is actually solved is `B x = b`,
where `B = A` up to rounding error. The exception is raised if LAPACK
routine `DGESV` reports a failure --- this means that `B` is singular.
http://www.netlib.org/lapack/lug/node78.html#10344
This is a documentation issue --- the meaning of the exception could be
better explained.
--
Ticket URL: <http://projects.scipy.org/scipy/ticket/1730#comment:1>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.
More information about the Scipy-tickets
mailing list