[SciPy-dev] Extensions linking to libraries used by numpy/scipy
Tom Loredo
loredo at astro.cornell.edu
Tue Mar 7 11:53:03 CST 2006
Robert Kern wrote:
> I'm using OS X 10.4, although I think I build with ATLAS. I think you
> should at least have flapack. Can you successfully call any of the functions
> from scipy.linalg? What versions of numpy/scipy are you using? Can you try "from
> scipy.linalg import flapack"? What does
>
> In [3]: from numpy import linalg as n_linalg
>
> In [4]: from scipy import linalg as s_linalg
>
> In [5]: n_linalg is s_linalg
> Out[5]: False
>
> give you?
The following is with OS 10.3.9, MacPython 2.4.1, Numpy 0.9.5,
and Scipy 0.4.6:
In [1]: from numpy import linalg as n_linalg
In [2]: from scipy import linalg as s_linalg
In [3]: n_linalg is s_linalg
Out[3]: True
In [4]: from scipy.linalg import flapack
In [5]: scipy.linalg.flapack.dgetrf._cpointer
Out[6]: <PyCObject object at 0x105c1a0>
Huh? So I tried:
In [10]: from scipy import linalg
In [11]: linalg.flapack.dgetrf._cpointer
Out[11]: <PyCObject object at 0x105c1a0>
So I quit IPython, started it afresh, and:
In [1]: from scipy import linalg
In [2]: linalg.flapack.dgetrf._cpointer
AttributeError: 'module' object has no attribute 'flapack'
In [3]: from scipy.linalg import flapack
In [4]: linalg.flapack.dgetrf._cpointer
AttributeError: 'module' object has no attribute 'flapack'
In [5]: flapack.dgetrf._cpointer
Out[5]: <PyCObject object at 0xd2c0>
In [9]: dir(linalg)
Out[9]:
['Heigenvalues',
'Heigenvectors',
'LinAlgError',
'ScipyTest',
'__builtins__',
'__doc__',
'__file__',
'__name__',
'__path__',
'cholesky',
'cholesky_decomposition',
'det',
'determinant',
'eig',
'eigenvalues',
'eigenvectors',
'eigh',
'eigvals',
'eigvalsh',
'generalized_inverse',
'inv',
'inverse',
'lapack_lite',
'linalg',
'linear_least_squares',
'lstsq',
'pinv',
'singular_value_decomposition',
'solve',
'solve_linear_equations',
'svd',
'test']
No "flapack" there---should there be? Is some import magic
happening that I don't understand? Is the presence of
"lapack_lite" a hint of something amiss?
-Tom
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
More information about the Scipy-dev
mailing list