[SciPy-User] scipy.linalg.det TypeError

David Goldsmith d.l.goldsmith at gmail.com
Thu Oct 29 04:58:48 EDT 2009


Uncertain why you're having a problem - your sample code works for me:

>>> import scipy.linalg
>>> import numpy.linalg
>>> A=np.matrix([[1.1, 1.9],[1.9,3.5]])
>>> y = numpy.linalg.det(A); y
0.23999999999999988
>>> y = scipy.linalg.det(A); y
0.23999999999999988
>>> scipy.__version__
'0.7.1'
>>> np.__version__
'1.3.0rc2'
Python 2.5 on Windoze Vista HPE

DG

On Wed, Oct 28, 2009 at 12:07 PM, Norm Wood <nbwood at lamar.colostate.edu>wrote:

>
> fine.  Here's simple code that shows the problem:
>
> #!/usr/bin/env /usr/bin/python
>
> import numpy
> import scipy.linalg
> import numpy.linalg
>
> A = numpy.matrix([[1.1, 1.9],[1.9,3.5]])
> #This works fine
> y = numpy.linalg.det(A)
> #This throws a TypeError
> y = scipy.linalg.det(A)
>
> I'm using LAPACK 3.1.1, Atlas 3.8.0, numpy 1.2.1, and I've tried both
> scipy 0.7.0 and 0.7.1, all built with gcc 3.3.6 & g77.
>
> Platform is Linux (Slackware 10.2), kernel 2.4.31.
> Python is version 2.4.1, built with gcc 3.3.5
>
> Here's the Atlas build info:
> ATLAS version 3.8.0 built by norm on Thu Dec  6 17:18:59 MST 2007:
>   UNAME    : Linux wombat 2.4.31-1 #1 SMP Wed Dec 7 16:52:41 MST 2005 i686
> unknown unknown GNU/Linux
>   INSTFLG  : -1 0 -a 1
>   ARCHDEFS : -DATL_OS_Linux -DATL_ARCH_P4E -DATL_CPUMHZ=3014 -DATL_SSE3
> -DATL_SSE2 -DATL_SSE1 -DATL_GAS_x8632
>   F2CDEFS  : -DAdd__ -DF77_INTEGER=int -DStringSunStyle
>   CACHEEDGE: 524288
>   F77      : g77, version GNU Fortran (GCC) 3.3.6
>   F77FLAGS : -O -m32
>   SMC      : gcc, version gcc (GCC) 3.3.6
>   SMCFLAGS : -fomit-frame-pointer -mfpmath=387 -O2 -falign-loops=4 -m32
>   SKC      : gcc, version gcc (GCC) 3.3.6
>   SKCFLAGS : -fomit-frame-pointer -mfpmath=387 -O2 -falign-loops=4 -m32
>
>
> The output of numpy/distutils/system_info.py is pretty long.  If there's
> particular information from that which would be useful, I'll be glad to
> send it, but it looks to me as if numpy and scipy are using the same
> atlas libraries.  Here's the atlas_info from system_info.py
>
> atlas_info:
>  libraries f77blas,cblas,atlas not found in /usr/local/lib
>  libraries lapack_atlas not found in /usr/local/lib
>  libraries lapack_atlas not found in /home/norm/lusr/lib
> __main__.atlas_info
>  FOUND:
>    libraries = ['lapack', 'f77blas', 'cblas', 'atlas']
>    library_dirs = ['/home/norm/lusr/lib']
>    language = f77
>    include_dirs = ['/home/norm/lusr/include']
>
>
> And here's the atlas_blas_info from the scipy build:
>
> atlas_blas_info:
>  libraries f77blas,cblas,atlas not found in /usr/local/lib
>  FOUND:
>    libraries = ['f77blas', 'cblas', 'atlas']
>    library_dirs = ['/home/norm/lusr/lib']
>    language = c
>    include_dirs = ['/home/norm/lusr/include']
>
>
> Thanks for any suggestions.
>
>
> Norm
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20091029/9bc73696/attachment.html>


More information about the SciPy-User mailing list