From: Lars B. <lar...@go...> - 2006-10-02 09:30:41
|
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: latest 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 latest 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. A typical error message from scipy.test(10): ====================================================================== ERROR: check_chebyc (scipy.special.tests.test_basic.test_chebyc) ---------------------------------------------------------------------- Traceback (most recent call last): File "[...]/lib/python2.5/site-packages/scipy/special/tests/test_basic.py", line 667, in check_chebyc C1 = chebyc(1) File "[...]/lib/python2.5/site-packages/scipy/special/orthogonal.py", line 461, in chebyc p = orthopoly1d(x,w,hn,kn,wfunc=lambda x: 1.0/sqrt(1-x*x/4.0),limits=(-2,2),monic=monic) File "[...]/lib/python2.5/site-packages/scipy/special/orthogonal.py", line 78, in __init__ equiv_weights = [weights[k] / wfunc(roots[k]) for k in range(len(roots))] TypeError: object of type 'numpy.complex128' has no len() Does anyone know how to resolve the problem? Best regards, Lars |
From: Lars B. <lar...@go...> - 2006-10-02 09:30:47
|
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: latest 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 latest 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. A typical error message from scipy.test(10): ====================================================================== ERROR: check_chebyc (scipy.special.tests.test_basic.test_chebyc) ---------------------------------------------------------------------- Traceback (most recent call last): File "[...]/lib/python2.5/site-packages/scipy/special/tests/test_basic.py", line 667, in check_chebyc C1 = chebyc(1) File "[...]/lib/python2.5/site-packages/scipy/special/orthogonal.py", line 461, in chebyc p = orthopoly1d(x,w,hn,kn,wfunc=lambda x: 1.0/sqrt(1-x*x/4.0),limits=(-2,2),monic=monic) File "[...]/lib/python2.5/site-packages/scipy/special/orthogonal.py", line 78, in __init__ equiv_weights = [weights[k] / wfunc(roots[k]) for k in range(len(roots))] TypeError: object of type 'numpy.complex128' has no len() Does anyone know how to resolve the problem? Best regards, Lars |
From: Lars B. <lar...@go...> - 2006-10-02 21:28:22
|
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. A typical error message from scipy.test(10): ====================================================================== ERROR: check_chebyc (scipy.special.tests.test_basic.test_chebyc) ---------------------------------------------------------------------- Traceback (most recent call last): File "[...]/lib/python2.5/site-packages/scipy/special/tests/test_basic.py", line 667, in check_chebyc C1 = chebyc(1) File "[...]/lib/python2.5/site-packages/scipy/special/orthogonal.py", line 461, in chebyc p = orthopoly1d(x,w,hn,kn,wfunc=lambda x: 1.0/sqrt(1-x*x/4.0),limits=(-2,2),monic=monic) File "[...]/lib/python2.5/site-packages/scipy/special/orthogonal.py", line 78, in __init__ equiv_weights = [weights[k] / wfunc(roots[k]) for k in range(len(roots))] TypeError: object of type 'numpy.complex128' has no len() Does anyone know how to resolve the problem? Best regards, Lars |
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 |
From: Lars B. <lar...@go...> - 2006-10-04 01:57:50
|
On Monday 02 October 2006 23:53, Travis Oliphant wrote: > 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. Ok, thank you. I tried that but the version of python-svn is 2.6 and there are much more complications like: File "[...]/lib/python2.6/site-packages/numpy/core/numeric.py", line 284 as = a.shape ^ SyntaxError: invalid syntax File "[...]/lib/python2.6/site-packages/numpy/f2py/crackfortran.py", line 1647 as=b['args'] ^ SyntaxError: invalid syntax I should try Python 2.4 for more stable results. P.S. Sorry for spaming you. I had problems with my mail address settings. I did not expect the mails to arrive after a few days. I thought that they were rejected. |
From: Gael V. <gae...@no...> - 2006-10-04 02:12:02
|
On Tue, Oct 03, 2006 at 11:53:22AM +0200, Lars Bittrich wrote: > On Monday 02 October 2006 23:53, Travis Oliphant wrote: > > 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. > Ok, thank you. I tried that but the version of python-svn is 2.6 No, Travis was talking of the numpy svn, not the python svn. Gael |
From: Lars B. <lar...@go...> - 2006-10-02 21:59:09
|
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. A typical error message from scipy.test(10): ====================================================================== ERROR: check_chebyc (scipy.special.tests.test_basic.test_chebyc) ---------------------------------------------------------------------- Traceback (most recent call last): File "[...]/lib/python2.5/site-packages/scipy/special/tests/test_basic.py", line 667, in check_chebyc C1 = chebyc(1) File "[...]/lib/python2.5/site-packages/scipy/special/orthogonal.py", line 461, in chebyc p = orthopoly1d(x,w,hn,kn,wfunc=lambda x: 1.0/sqrt(1-x*x/4.0),limits=(-2,2),monic=monic) File "[...]/lib/python2.5/site-packages/scipy/special/orthogonal.py", line 78, in __init__ equiv_weights = [weights[k] / wfunc(roots[k]) for k in range(len(roots))] TypeError: object of type 'numpy.complex128' has no len() Does anyone know how to resolve the problem? Best regards, Lars |
From: Lars B. <lar...@go...> - 2006-10-02 21:59:10
|
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. A typical error message from scipy.test(10): ====================================================================== ERROR: check_chebyc (scipy.special.tests.test_basic.test_chebyc) ---------------------------------------------------------------------- Traceback (most recent call last): File "[...]/lib/python2.5/site-packages/scipy/special/tests/test_basic.py", line 667, in check_chebyc C1 = chebyc(1) File "[...]/lib/python2.5/site-packages/scipy/special/orthogonal.py", line 461, in chebyc p = orthopoly1d(x,w,hn,kn,wfunc=lambda x: 1.0/sqrt(1-x*x/4.0),limits=(-2,2),monic=monic) File "[...]/lib/python2.5/site-packages/scipy/special/orthogonal.py", line 78, in __init__ equiv_weights = [weights[k] / wfunc(roots[k]) for k in range(len(roots))] TypeError: object of type 'numpy.complex128' has no len() Does anyone know how to resolve the problem? Best regards, Lars |