[SciPy-User] Disable singular matrix warning
Carlos Baptista
carlossbaptista at gmail.com
Sun Aug 12 09:49:43 EDT 2012
Hello there,
I am fairly new to Python. As a self-test I re-programmed an old MATLAB
assignment in Python using NumPy, SciPy and Matplotlib. At a certain point
I am getting the following warning:
warning: (almost) singular matrix! (estimated cond. number: 1.87e+14)
This result is however expected and therefore I would like to disable this
warning. I am getting this warning from:
scipy.sparse.linalg.spsolve(A,b)
where A has a large condition number.
I have already tried the following to no avail:
========================
import warnings
with warnings.catch_warnings():
warnings.filterwarnings("ignore",category=Warning)
from poisson import solvePoisson
========================
where solvePoisson is the function (located in poisson.py) in which the
above solve statement is executed.
How can I disable this singular matrix warning?
With kind regards,
Carlos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20120812/b28d7812/attachment.html>
More information about the SciPy-User
mailing list