[Numpy-discussion] linalg.det throws IndexError on 2.6.5

Ilya Sterin sterini at gmail.com
Sun May 30 16:22:06 EDT 2010


Numpy 1.4.1.  I built it myself.

The version of numpy in question on CentOS was built against a 2.6.5
version of python 64 bit binary and built/installed with pip.

The version which is working on my OS X is a universal binary and both
python and numpy are built as such.  I'm running python in 64bit mode
though and all works fine there.

I just tried to install numpy as per yum instructions on numpy site
with the default Centos python 2.4.  It installed numpy 1.2 and the
determinant function works there.

I need to get this to work with 2.6 though, as my app relies on it.  Any ideas?

Thanks.

Ilya




On Sun, May 30, 2010 at 4:02 PM, Charles R Harris
<charlesr.harris at gmail.com> wrote:
>
>
> On Sun, May 30, 2010 at 1:32 PM, Ilya Sterin <sterini at gmail.com> wrote:
>>
>> I'm not sure what's causing this at this point and before I dig deeper
>> thought someone can shed some light...
>>
>> On my Mac OS X python 2.6.1, numpy.linalg.det functions properly...
>>
>> >>> numpy.linalg.det(numpy.array([[1, 2], [3, 4]]))
>> -2.0
>>
>> On Centos 5 python 2.6.5, I get and IndexError (out of bounds)...
>>
>> >>> numpy.linalg.det(numpy.array([[1, 2], [3, 4]]))
>> Traceback (most recent call last):
>>  File "<stdin>", line 1, in <module>
>>  File "/opt/python2.6/lib/python2.6/site-packages/numpy/linalg/linalg.py",
>> line 1507, in det
>>    return (1.-2.*sign)*multiply.reduce(diagonal(a), axis=-1)
>>  File
>> "/opt/python2.6/lib/python2.6/site-packages/numpy/core/fromnumeric.py",
>> line 949, in diagonal
>>    return asarray(a).diagonal(offset, axis1, axis2)
>> IndexError: index 12884901888 out of bounds 0<=index<4
>>
>> Any ideas?
>>
>
> What numpy version? Also, who built the numpy/python? I rather suspect a
> type problem somewhere.
>
> Chuck
>
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>



More information about the NumPy-Discussion mailing list