[SciPy-dev] Linalg

Pearu Peterson pearu at cens.ioc.ee
Mon Mar 25 11:41:42 CST 2002


On Mon, 25 Mar 2002, Travis Oliphant wrote:

> >>> linalg.inv(a)
> array_from_pyobj:intent(inout) array must be contiguous and with a proper 
> type and size.
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "/usr/lib/python2.1/site-packages/scipy/linalg/linear_algebra.py", 
> line 150, in inv
>     results = getrf(a)
> flapack.error: failed in converting 1st argument `a' of flapack.dgetrf to 
> C/Fortran array
> 
> This sounds like an f2py issue, but I thought I had it working yesterday with 
> the new f2py.

Nothing changed in f2py lately, so I don't think that it is an f2py issue.


> linalg2 is giving me outputs that are completely wrong. 
> 
> >>> import scipy.linalg2
> >>> scipy.linalg2.inv(a)
> array([[ 0.   +nanj,  0.   +nanj,  0.   +nanj],
>        [ 0.   +nanj,  0.   +nanj,  0.   +nanj],
>        [ 0.   +nanj,  0.   +nanj,  0.   +nanj]],'F')
> 
> Does this work for anybody else?

Yes, latest CVS works fine for me:

Python 2.2 (#7, Jan 28 2002, 13:08:12) 
[GCC 3.0.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import scipy.linalg 
>>> import scipy.linalg2
>>> scipy.linalg.inv([[1,2],[3,4]])
array([[-2. ,  1. ],
       [ 1.5, -0.5]])
>>> scipy.linalg2.inv([[1,2],[3,4]])
array([[-2. ,  1. ],
       [ 1.5, -0.5]])
>>> scipy.__version__ 
'0.2.0-alpha-38.3279'


May be your ATLAS installation is broken? Are you using the unstable
version of ATLAS? What system_info.py shows to you?

Pearu




More information about the Scipy-dev mailing list