Exception AttributeError: "'UmfpackContext' object has no attribute '_symbolic'" in <bound method UmfpackContext.__del__ of <scipy.sparse.linalg.dsolve.umfpack.umfpack.UmfpackContext object at 0x101b62050>> ignored
Final note - umfpack enables mode='cg' in random_walker, which is better than brute force but not the fastest or most efficient mode. The multi-grid preconditioned conjugate gradient method is: mode='cg_mg'. This is enabled by pyamg, which is independent of umfpack and is considerably easier to install and use than the method I just described.
Come to think of it, we probably should suppress that warning if import pyamg works. It incorrectly implies the user doesn't have the fastest mode available.
On Thursday, October 3, 2013 1:21:43 AM UTC-5, Juan Nunez-Iglesias wrote:
--You received this message because you are subscribed to the Google Groups "scikit-image" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scikit-image...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
building extension "scipy.sparse.linalg.dsolve.umfpack.__umfpack" sources
creating build/src.linux-x86_64-2.7/scipy/sparse/linalg/dsolve
creating build/src.linux-x86_64-2.7/scipy/sparse/linalg/dsolve/umfpack
adding 'scipy/sparse/linalg/dsolve/umfpack/umfpack.i' to sources.
swig: scipy/sparse/linalg/dsolve/umfpack/umfpack.i
swig -python -I/usr/include/suitesparse -I/usr/include/suitesparse -I/usr/include/suitesparse -o build/src.linux-x86_64-2.7/scipy/sparse/linalg/dsolve/umfpack/_umfpack_wrap.c -outdir build/src.linux-x86_64-2.7/scipy/sparse/linalg/dsolve/umfpack scipy/sparse/linalg/dsolve/umfpack/umfpack.i
unable to execute swig: No such file or directory
error: command 'swig' failed with exit status 1
Are you sure you have SWIG installed?
try:
from scipy.sparse.linalg.dsolve import umfpack
UmfpackContext = umfpack.UmfpackContext()
except:
UmfpackContext = None
In [1]: from scipy.sparse.linalg.dsolve import umfpack
In [2]: try:
UC = umfpack.UmfpackContext()
except ImportError:
print 'hello'
...:
hello
Exception AttributeError: "'UmfpackContext' object has no attribute '_symbolic'" in <bound method UmfpackContext.__del__ of <scipy.sparse.linalg.dsolve.umfpack.umfpack.UmfpackContext object at 0x103938250>> ignored
In [3]: import sys, os
In [4]: null = open(os.devnull, 'w')
In [5]: null.write('hello!')
In [6]: sys.stdout.write('hello!')
hello!
In [7]: sys.stderr.write('hello')
hello
In [8]: sys.stderr = null
In [9]: sys.stderr.write('hello')
In [10]: try:
UC = umfpack.UmfpackContext()
except ImportError:
print 'hello'
....:
hello
In [11]: sys.stderr = sys.__stderr__
In [12]: sys.stderr.write('hello')
hello
sys.stderr = open(os.devnull, 'w')
try:
from scipy.sparse.linalg.dsolve import umfpack
UmfpackContext = umfpack.UmfpackContext()
except:
UmfpackContext = None
finally:
sys.stderr.flush()
sys.stderr = sys.__stderr__