From: Travis O. <oli...@ee...> - 2006-10-02 21:53:21
|
Lars Bittrich wrote: >Hi all, > >recently I tried to compile numpy/scipy with Python 2.5 and Intel C++ compiler >9.1. At first everything was fine, but the scipy test produced a few errors. >The reason was a little difference: > >numpy svn(1.0.dev3233) with Intel C compiler (Python 2.5): >----------------------------------------------------------- >In [1]:from numpy import ones, zeros, integer > >In [2]: > >In [2]:x = ones(1) > >In [3]:i = zeros(1, integer) > >In [4]:x[i] >Out[4]:1.0 > >numpy svn(1.0.dev3233) with GCC 3.3 (Python 2.3): >-------------------------------------------------- >In [1]:from numpy import ones, zeros, integer > >In [2]: > >In [2]:x = ones(1) > >In [3]:i = zeros(1, integer) > >In [4]:print x[i] >Out[4]:array([1]) > >The Intel version gives me a scalar whereas the gcc version an array. Maybe >Python 2.5 is causing this problem but my first guess was the compiler. > > > This is a Python 2.5 issue (the new __index__ method) was incorrectly implemented and allowing a 1-d array to be interpreted as an index. This should be fixed in SVN. -Travis |