[Python-modules-team] Bug#581043: python-numpy: veiled problem interfacing lapack routines while providing ndarray of non-native byte_order
Yaroslav Halchenko
debian at onerussian.com
Mon May 10 18:36:14 UTC 2010
Package: python-numpy
Version: 1:1.3.0-3+b1
Severity: important
Tags: upstream
While working on resolving FTBFS #580879 against scikit-learn, I've ran into
numpy being unable to compute properly some (not sure if all or exhaustive list
of what are affected) functions from LAPACK interfaced under .linalg, whenever
ndarray's dtype is of non-native byteorder.
for instance on my amd64 laptop:
$> python -c "import numpy as N; print N.linalg.cholesky(N.array([[ 5.7998084, -2.1825367 ], [-2.1825367, 9.85910595]], dtype='<f8'))"
[[ 2.40827914 -0. ]
[-0.90626401 3.00629199]]
$> python -c "import numpy as N; print N.linalg.cholesky(N.array([[ 5.7998084, -2.1825367 ], [-2.1825367, 9.85910595]], dtype='>f8'))"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python2.5/site-packages/numpy/linalg/linalg.py", line 423, in cholesky
Cholesky decomposition cannot be computed'
numpy.linalg.linalg.LinAlgError: Matrix is not positive definite - Cholesky decomposition cannot be computed
$> python -c "import numpy as N; print N.linalg.svd(N.array([[ 5.7998084, -2.1825367 ], [-2.1825367, 9.85910595]], dtype='<f8'))"
(array([[-0.39937903, 0.9167859 ],
[ 0.9167859 , 0.39937903]]), array([ 10.80988342, 4.84903093]), array([[-0.39937903, 0.9167859 ],
[ 0.9167859 , 0.39937903]]))
$> python -c "import numpy as N; print N.linalg.svd(N.array([[ 5.7998084, -2.1825367 ], [-2.1825367, 9.85910595]], dtype='>f8'))"
(array([[ 0., -1.],
[-1., 0.]]), array([ 1.29365302e+157, 1.29365302e+157]), array([[ 1., 0.],
[ 0., 1.]]))
so, some times it might fail with incorrect error msg for the exception, some
times just produces bogus results.
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (901, 'unstable'), (900, 'testing'), (300, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-3-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages python-numpy depends on:
ii libatlas3gf-base [liblapack.s 3.8.3-19 Automatically Tuned Linear Algebra
ii libblas3gf [libblas.so.3gf] 1.2-7 Basic Linear Algebra Reference imp
ii libc6 2.10.2-7 Embedded GNU C Library: Shared lib
ii libgcc1 1:4.4.3-9 GCC support library
ii libgfortran3 4.4.3-9 Runtime library for GNU Fortran ap
ii liblapack3gf [liblapack.so.3g 3.2.1-7 library of linear algebra routines
ii python 2.5.4-9 An interactive high-level object-o
ii python-central 0.6.16 register and build utility for Pyt
python-numpy recommends no packages.
Versions of packages python-numpy suggests:
ii python-nose 0.11.1-1 test discovery and running for Pyt
ii python-numpy-dbg 1:1.3.0-3+b1 Fast array facility to the Python
ii python-numpy-doc 1:1.3.0-3 NumPy documentation
-- no debconf information
More information about the Python-modules-team
mailing list