Re: [Numpy-discussion] Numpy - MKL - build error

2011-09-14 Thread Igor Ying
Yes, they all are present in that directory.  Also, I tried with root as login.


-r-xr-xr-x 1 root root  26342559 Aug  9 22:19 libmkl_avx.so
-r--r--r-- 1 root root   1190224 Aug  9 22:26 libmkl_blacs_ilp64.a
-r--r--r-- 1 root root   1191496 Aug  9 22:25 libmkl_blacs_intelmpi_ilp64.a
-r-xr-xr-x 1 root root    497597 Aug  9 22:25 libmkl_blacs_intelmpi_ilp64.so
-r--r--r-- 1 root root    676206 Aug  9 22:21 libmkl_blacs_intelmpi_lp64.a
-r-xr-xr-x 1 root root    267010 Aug  9 22:21 libmkl_blacs_intelmpi_lp64.so
-r--r--r-- 1 root root    674926 Aug  9 22:22 libmkl_blacs_lp64.a
-r--r--r-- 1 root root   1218290 Aug  9 22:28 libmkl_blacs_openmpi_ilp64.a
-r--r--r-- 1 root root    703042 Aug  9 22:23 libmkl_blacs_openmpi_lp64.a
-r--r--r-- 1 root root   1191152 Aug  9 22:29 libmkl_blacs_sgimpt_ilp64.a
-r--r--r-- 1 root root    675854 Aug  9 22:23 libmkl_blacs_sgimpt_lp64.a
-r--r--r-- 1 root root    425802 Aug  9 20:44 libmkl_blas95_ilp64.a
-r--r--r-- 1 root root    421410 Aug  9 20:44 libmkl_blas95_lp64.a
-r--r--r-- 1 root root    144354 Aug  9 22:29 libmkl_cdft_core.a
-r-xr-xr-x 1 root root    115588 Aug  9 22:29 libmkl_cdft_core.so
-r--r--r-- 1 root root 231886824 Aug  9 22:07 libmkl_core.a
-r-xr-xr-x 1 root root  16730033 Aug  9 22:18 libmkl_core.so
-r-xr-xr-x 1 root root  21474555 Aug  9 22:18 libmkl_def.so
-r--r--r-- 1 root root  14974574 Aug  9 22:06 libmkl_gf_ilp64.a
-r-xr-xr-x 1 root root   7008828 Aug  9 22:48 libmkl_gf_ilp64.so
-r--r--r-- 1 root root  15140998 Aug  9 22:06 libmkl_gf_lp64.a
-r-xr-xr-x 1 root root   7055304 Aug  9 22:48 libmkl_gf_lp64.so
-r--r--r-- 1 root root  16435120 Aug  9 22:07 libmkl_gnu_thread.a
-r-xr-xr-x 1 root root   9816940 Aug  9 22:49 libmkl_gnu_thread.so
-r--r--r-- 1 root root  14968130 Aug  9 22:06 libmkl_intel_ilp64.a
-r-xr-xr-x 1 root root   7008368 Aug  9 22:48 libmkl_intel_ilp64.so
-r--r--r-- 1 root root  15134406 Aug  9 22:06 libmkl_intel_lp64.a
-r-xr-xr-x 1 root root   7053588 Aug  9 22:48 libmkl_intel_lp64.so
-r--r--r-- 1 root root   2472940 Aug  9 22:07 libmkl_intel_sp2dp.a
-r-xr-xr-x 1 root root   1191479 Aug  9 22:20 libmkl_intel_sp2dp.so
-r--r--r-- 1 root root  27642508 Aug  9 22:07 libmkl_intel_thread.a
-r-xr-xr-x 1 root root  17516608 Aug  9 22:49 libmkl_intel_thread.so
-r--r--r-- 1 root root   5350948 Aug  9 20:44 libmkl_lapack95_ilp64.a
-r--r--r-- 1 root root   5413476 Aug  9 20:44 libmkl_lapack95_lp64.a
-r-xr-xr-x 1 root root  29543829 Aug  9 22:19 libmkl_mc3.so
-r-xr-xr-x 1 root root  25428037 Aug  9 22:19 libmkl_mc.so
-r-xr-xr-x 1 root root  22888659 Aug  9 22:18 libmkl_p4n.so
-r--r--r-- 1 root root  19232716 Aug  9 22:07 libmkl_pgi_thread.a
-r-xr-xr-x 1 root root  12243062 Aug  9 22:49 libmkl_pgi_thread.so
-r-xr-xr-x 1 root root   4984870 Aug  9 22:49 libmkl_rt.so
-r--r--r-- 1 root root  10367758 Aug  9 22:49 libmkl_scalapack_ilp64.a
-r-xr-xr-x 1 root root   6574928 Aug  9 22:50 libmkl_scalapack_ilp64.so
-r--r--r-- 1 root root  10292432 Aug  9 22:49 libmkl_scalapack_lp64.a
-r-xr-xr-x 1 root root   6452627 Aug  9 22:50 libmkl_scalapack_lp64.so
-r--r--r-- 1 root root   9958444 Aug  9 22:07 libmkl_sequential.a
-r-xr-xr-x 1 root root   5926347 Aug  9 22:48 libmkl_sequential.so
-r--r--r-- 1 root root  1048 Aug  9 16:50 libmkl_solver_ilp64.a
-r--r--r-- 1 root root  1048 Aug  9 16:50 libmkl_solver_ilp64_sequential.a
-r--r--r-- 1 root root  1048 Aug  9 16:50 libmkl_solver_lp64.a
-r--r--r-- 1 root root  1048 Aug  9 16:50 libmkl_solver_lp64_sequential.a
-r-xr-xr-x 1 root root   6711968 Aug  9 22:48 libmkl_vml_avx.so
-r-xr-xr-x 1 root root   2795928 Aug  9 22:47 libmkl_vml_def.so
-r-xr-xr-x 1 root root   5476786 Aug  9 22:48 libmkl_vml_mc2.so
-r-xr-xr-x 1 root root   5778052 Aug  9 22:48 libmkl_vml_mc3.so
-r-xr-xr-x 1 root root   5382511 Aug  9 22:48 libmkl_vml_mc.so
-r-xr-xr-x 1 root root   4235841 Aug  9 22:48 libmkl_vml_p4n.so
drwxr-xr-x 3 root root  4096 Aug 18 11:43 locale

Y


you can reach the person managing the list at
    numpy-discussion-ow...@scipy.org


Message: 1
Date: Tue, 13 Sep 2011 09:58:27 -0400
From: Olivier Delalleau sh...@keba.be
Subject: Re: [Numpy-discussion] Numpy - MKL - build error
To: Discussion of Numerical Python numpy-discussion@scipy.org
Message-ID:
    cafxk4bpdn7qcwmze2g565gsuontau7lmh4fgsth_zy_r+nl...@mail.gmail.com
Content-Type: text/plain; charset=iso-8859-1

Sorry if it sounds like a stupid question, but are the files listed in the
error message present in that directory?
If yes, maybe try running the command with sudo, just in case it would be
some weird permission issue.

-=- Olivier

2011/9/13 Igor Ying igor.y...@yahoo.com

 Hi,

  I am very new to Numpy and  trying to build Numpy 1.6.1 with Intel MKL
 10.3.6 and getting the following errors.

 $python setup.py config --compiler=intel build_clib --compiler=intel
 build_ext --compiler=intel install

 Running from numpy source directory.F2PY Version 2
 blas_opt_info:
 blas_mkl_info:
   libraries mkl_def,mkl_intel_lp64,mkl_intel_thread,mkl_core,iomp5md not
 

Re: [Numpy-discussion] Numpy - MKL - build error

2011-09-14 Thread Matthieu Brucher
It seems you are missing libiomp5.so, which is sound if you re using the
whole Composer package: the needed libs are split in two different
locations, and unfortunately, Numpy cannot cope with this last time I
checked (I think it was one of the reasons David Cournapeau created numscons
and bento).

Matthieu

2011/9/14 Igor Ying igor.y...@yahoo.com

 Yes, they all are present in that directory.  Also, I tried with root as
 login.

 -r-xr-xr-x 1 root root  26342559 Aug  9 22:19 libmkl_avx.so
 -r--r--r-- 1 root root   1190224 Aug  9 22:26 libmkl_blacs_ilp64.a
 -r--r--r-- 1 root root   1191496 Aug  9 22:25 libmkl_blacs_intelmpi_ilp64.a
 -r-xr-xr-x 1 root root497597 Aug  9 22:25
 libmkl_blacs_intelmpi_ilp64.so
 -r--r--r-- 1 root root676206 Aug  9 22:21 libmkl_blacs_intelmpi_lp64.a
 -r-xr-xr-x 1 root root267010 Aug  9 22:21 libmkl_blacs_intelmpi_lp64.so
 -r--r--r-- 1 root root674926 Aug  9 22:22 libmkl_blacs_lp64.a
 -r--r--r-- 1 root root   1218290 Aug  9 22:28 libmkl_blacs_openmpi_ilp64.a
 -r--r--r-- 1 root root703042 Aug  9 22:23 libmkl_blacs_openmpi_lp64.a
 -r--r--r-- 1 root root   1191152 Aug  9 22:29 libmkl_blacs_sgimpt_ilp64.a
 -r--r--r-- 1 root root675854 Aug  9 22:23 libmkl_blacs_sgimpt_lp64.a
 -r--r--r-- 1 root root425802 Aug  9 20:44 libmkl_blas95_ilp64.a
 -r--r--r-- 1 root root421410 Aug  9 20:44 libmkl_blas95_lp64.a
 -r--r--r-- 1 root root144354 Aug  9 22:29 libmkl_cdft_core.a
 -r-xr-xr-x 1 root root115588 Aug  9 22:29 libmkl_cdft_core.so
 -r--r--r-- 1 root root 231886824 Aug  9 22:07 libmkl_core.a
 -r-xr-xr-x 1 root root  16730033 Aug  9 22:18 libmkl_core.so
 -r-xr-xr-x 1 root root  21474555 Aug  9 22:18 libmkl_def.so
 -r--r--r-- 1 root root  14974574 Aug  9 22:06 libmkl_gf_ilp64.a
 -r-xr-xr-x 1 root root   7008828 Aug  9 22:48 libmkl_gf_ilp64.so
 -r--r--r-- 1 root root  15140998 Aug  9 22:06 libmkl_gf_lp64.a
 -r-xr-xr-x 1 root root   7055304 Aug  9 22:48 libmkl_gf_lp64.so
 -r--r--r-- 1 root root  16435120 Aug  9 22:07 libmkl_gnu_thread.a
 -r-xr-xr-x 1 root root   9816940 Aug  9 22:49 libmkl_gnu_thread.so
 -r--r--r-- 1 root root  14968130 Aug  9 22:06 libmkl_intel_ilp64.a
 -r-xr-xr-x 1 root root   7008368 Aug  9 22:48 libmkl_intel_ilp64.so
 -r--r--r-- 1 root root  15134406 Aug  9 22:06 libmkl_intel_lp64.a
 -r-xr-xr-x 1 root root   7053588 Aug  9 22:48 libmkl_intel_lp64.so
 -r--r--r-- 1 root root   2472940 Aug  9 22:07 libmkl_intel_sp2dp.a
 -r-xr-xr-x 1 root root   1191479 Aug  9 22:20 libmkl_intel_sp2dp.so
 -r--r--r-- 1 root root  27642508 Aug  9 22:07 libmkl_intel_thread.a
 -r-xr-xr-x 1 root root  17516608 Aug  9 22:49 libmkl_intel_thread.so
 -r--r--r-- 1 root root   5350948 Aug  9 20:44 libmkl_lapack95_ilp64.a
 -r--r--r-- 1 root root   5413476 Aug  9 20:44 libmkl_lapack95_lp64.a
 -r-xr-xr-x 1 root root  29543829 Aug  9 22:19 libmkl_mc3.so
 -r-xr-xr-x 1 root root  25428037 Aug  9 22:19 libmkl_mc.so
 -r-xr-xr-x 1 root root  22888659 Aug  9 22:18 libmkl_p4n.so
 -r--r--r-- 1 root root  19232716 Aug  9 22:07 libmkl_pgi_thread.a
 -r-xr-xr-x 1 root root  12243062 Aug  9 22:49 libmkl_pgi_thread.so
 -r-xr-xr-x 1 root root   4984870 Aug  9 22:49 libmkl_rt.so
 -r--r--r-- 1 root root  10367758 Aug  9 22:49 libmkl_scalapack_ilp64.a
 -r-xr-xr-x 1 root root   6574928 Aug  9 22:50 libmkl_scalapack_ilp64.so
 -r--r--r-- 1 root root  10292432 Aug  9 22:49 libmkl_scalapack_lp64.a
 -r-xr-xr-x 1 root root   6452627 Aug  9 22:50 libmkl_scalapack_lp64.so
 -r--r--r-- 1 root root   9958444 Aug  9 22:07 libmkl_sequential.a
 -r-xr-xr-x 1 root root   5926347 Aug  9 22:48 libmkl_sequential.so
 -r--r--r-- 1 root root  1048 Aug  9 16:50 libmkl_solver_ilp64.a
 -r--r--r-- 1 root root  1048 Aug  9 16:50
 libmkl_solver_ilp64_sequential.a
 -r--r--r-- 1 root root  1048 Aug  9 16:50 libmkl_solver_lp64.a
 -r--r--r-- 1 root root  1048 Aug  9 16:50
 libmkl_solver_lp64_sequential.a
 -r-xr-xr-x 1 root root   6711968 Aug  9 22:48 libmkl_vml_avx.so
 -r-xr-xr-x 1 root root   2795928 Aug  9 22:47 libmkl_vml_def.so
 -r-xr-xr-x 1 root root   5476786 Aug  9 22:48 libmkl_vml_mc2.so
 -r-xr-xr-x 1 root root   5778052 Aug  9 22:48 libmkl_vml_mc3.so
 -r-xr-xr-x 1 root root   5382511 Aug  9 22:48 libmkl_vml_mc.so
 -r-xr-xr-x 1 root root   4235841 Aug  9 22:48 libmkl_vml_p4n.so
 drwxr-xr-x 3 root root  4096 Aug 18 11:43 locale
 Y


 you can reach the person managing the list at
 numpy-discussion-ow...@scipy.org


 Message: 1
 Date: Tue, 13 Sep 2011 09:58:27 -0400
 From: Olivier Delalleau sh...@keba.be
 Subject: Re: [Numpy-discussion] Numpy - MKL - build error
 To: Discussion of Numerical Python numpy-discussion@scipy.org
 Message-ID:
 cafxk4bpdn7qcwmze2g565gsuontau7lmh4fgsth_zy_r+nl...@mail.gmail.com
 Content-Type: text/plain; charset=iso-8859-1


 Sorry if it sounds like a stupid question, but are the files listed in the
 error message present in that directory?
 If yes, maybe try running the command with sudo, just in case it would be
 some weird permission issue.

 -=- Olivier

 

Re: [Numpy-discussion] Numpy - MKL - build error

2011-09-14 Thread Igor Ying
My bad, iomp5md is in compiler/lib dir, I copied it to the mkl dir and it 
worked.



From: Igor Ying igor.y...@yahoo.com
To: numpy-discussion@scipy.org numpy-discussion@scipy.org
Sent: Wednesday, September 14, 2011 1:07 PM
Subject: Re: Numpy - MKL - build error


Yes, they all are present in that directory.  Also, I tried with root as login.


-r-xr-xr-x 1 root root  26342559 Aug  9 22:19 libmkl_avx.so
-r--r--r-- 1 root root   1190224 Aug  9 22:26 libmkl_blacs_ilp64.a
-r--r--r-- 1 root root   1191496 Aug  9 22:25 libmkl_blacs_intelmpi_ilp64.a
-r-xr-xr-x 1 root root    497597 Aug  9 22:25 libmkl_blacs_intelmpi_ilp64.so
-r--r--r-- 1 root root    676206 Aug  9 22:21 libmkl_blacs_intelmpi_lp64.a
-r-xr-xr-x 1 root root    267010 Aug  9 22:21 libmkl_blacs_intelmpi_lp64.so
-r--r--r-- 1 root root    674926 Aug  9 22:22 libmkl_blacs_lp64.a
-r--r--r-- 1 root root   1218290 Aug 
 9 22:28 libmkl_blacs_openmpi_ilp64.a
-r--r--r-- 1 root root    703042 Aug  9 22:23 libmkl_blacs_openmpi_lp64.a
-r--r--r-- 1 root root   1191152 Aug  9 22:29 libmkl_blacs_sgimpt_ilp64.a
-r--r--r-- 1 root root    675854 Aug  9 22:23 libmkl_blacs_sgimpt_lp64.a
-r--r--r-- 1 root root    425802 Aug  9 20:44 libmkl_blas95_ilp64.a
-r--r--r-- 1 root root    421410 Aug  9 20:44 libmkl_blas95_lp64.a
-r--r--r-- 1 root root    144354 Aug  9 22:29 libmkl_cdft_core.a
-r-xr-xr-x 1 root root    115588 Aug  9 22:29 libmkl_cdft_core.so
-r--r--r-- 1 root root 231886824 Aug  9 22:07 libmkl_core.a
-r-xr-xr-x 1 root root  16730033 Aug  9 22:18 libmkl_core.so
-r-xr-xr-x 1 root root  21474555 Aug  9 22:18 libmkl_def.so
-r--r--r-- 1 root root  14974574 Aug  9 22:06
 libmkl_gf_ilp64.a
-r-xr-xr-x 1 root root   7008828 Aug  9 22:48 libmkl_gf_ilp64.so
-r--r--r-- 1 root root  15140998 Aug  9 22:06 libmkl_gf_lp64.a
-r-xr-xr-x 1 root root   7055304 Aug  9 22:48 libmkl_gf_lp64.so
-r--r--r-- 1 root root  16435120 Aug  9 22:07 libmkl_gnu_thread.a
-r-xr-xr-x 1 root root   9816940 Aug  9 22:49 libmkl_gnu_thread.so
-r--r--r-- 1 root root  14968130 Aug  9 22:06 libmkl_intel_ilp64.a
-r-xr-xr-x 1 root root   7008368 Aug  9 22:48 libmkl_intel_ilp64.so
-r--r--r-- 1 root root  15134406 Aug  9 22:06 libmkl_intel_lp64.a
-r-xr-xr-x 1 root root   7053588 Aug  9 22:48 libmkl_intel_lp64.so
-r--r--r-- 1 root root   2472940 Aug  9 22:07 libmkl_intel_sp2dp.a
-r-xr-xr-x 1 root root   1191479 Aug  9 22:20 libmkl_intel_sp2dp.so
-r--r--r-- 1 root root  27642508
 Aug  9 22:07 libmkl_intel_thread.a
-r-xr-xr-x 1 root root  17516608 Aug  9 22:49 libmkl_intel_thread.so
-r--r--r-- 1 root root   5350948 Aug  9 20:44 libmkl_lapack95_ilp64.a
-r--r--r-- 1 root root   5413476 Aug  9 20:44 libmkl_lapack95_lp64.a
-r-xr-xr-x 1 root root  29543829 Aug  9 22:19 libmkl_mc3.so
-r-xr-xr-x 1 root root  25428037 Aug  9 22:19 libmkl_mc.so
-r-xr-xr-x 1 root root  22888659 Aug  9 22:18 libmkl_p4n.so
-r--r--r-- 1 root root  19232716 Aug  9 22:07 libmkl_pgi_thread.a
-r-xr-xr-x 1 root root  12243062 Aug  9 22:49 libmkl_pgi_thread.so
-r-xr-xr-x 1 root root   4984870 Aug  9 22:49 libmkl_rt.so
-r--r--r-- 1 root root  10367758 Aug  9 22:49 libmkl_scalapack_ilp64.a
-r-xr-xr-x 1 root root   6574928 Aug  9 22:50 libmkl_scalapack_ilp64.so
-r--r--r-- 1 root root  10292432
 Aug  9 22:49 libmkl_scalapack_lp64.a
-r-xr-xr-x 1 root root   6452627 Aug  9 22:50 libmkl_scalapack_lp64.so
-r--r--r-- 1 root root   9958444 Aug  9 22:07 libmkl_sequential.a
-r-xr-xr-x 1 root root   5926347 Aug  9 22:48 libmkl_sequential.so
-r--r--r-- 1 root root  1048 Aug  9 16:50 libmkl_solver_ilp64.a
-r--r--r-- 1 root root  1048 Aug  9 16:50 libmkl_solver_ilp64_sequential.a
-r--r--r-- 1 root root  1048 Aug  9 16:50 libmkl_solver_lp64.a
-r--r--r-- 1 root root  1048 Aug  9 16:50 libmkl_solver_lp64_sequential.a
-r-xr-xr-x 1 root root   6711968 Aug  9 22:48 libmkl_vml_avx.so
-r-xr-xr-x 1 root root   2795928 Aug  9 22:47 libmkl_vml_def.so
-r-xr-xr-x 1 root root   5476786 Aug  9 22:48
 libmkl_vml_mc2.so
-r-xr-xr-x 1 root root   5778052 Aug  9 22:48 libmkl_vml_mc3.so
-r-xr-xr-x 1 root root   5382511 Aug  9 22:48 libmkl_vml_mc.so
-r-xr-xr-x 1 root root   4235841 Aug  9 22:48 libmkl_vml_p4n.so
drwxr-xr-x 3 root root  4096 Aug 18 11:43 locale

Y


you can reach the person managing the list at
    numpy-discussion-ow...@scipy.org


Message: 1
Date: Tue, 13 Sep 2011 09:58:27 -0400
From: Olivier Delalleau sh...@keba.be
Subject: Re: [Numpy-discussion] Numpy -
 MKL - build error
To: Discussion of Numerical Python numpy-discussion@scipy.org
Message-ID:
    cafxk4bpdn7qcwmze2g565gsuontau7lmh4fgsth_zy_r+nl...@mail.gmail.com
Content-Type: text/plain; charset=iso-8859-1

Sorry if it sounds like a stupid question, but are the files listed in the
error message present in that directory?
If yes, maybe try running the command with sudo, just in case it would be
some weird permission issue.

-=- Olivier

2011/9/13 Igor Ying igor.y...@yahoo.com

 Hi,

  I am very new to Numpy and  trying to build Numpy 1.6.1 with Intel MKL
 10.3.6 

[Numpy-discussion] behaviour of np.loadtxt

2011-09-14 Thread Davide
Dear list,

I'm encountering a problem with np.loadtxt.

Suppose i have a file containing three columns of data (and 10 rows), like:

0.001 0.003 0.005
0.001 0.003 0.006
0.002 0.004 0.002
0.004 0.002 0.007
0.001 0.003 0.006
0.002 0.004 0.002
0.004 0.002 0.007
0.001 0.003 0.006
0.002 0.004 0.002
0.004 0.002 0.007

If i give:

  len ( np.loadtxt( filename, unpack=True ) )

i get 3, since i have a three rows array. That's fine.

If instead the file has a single column, i.e.,

0.004
0.002
0.007
0.004
0.002
0.007
0.004
0.002
0.007
0.004

the command

  len ( np.loadtxt( filename, unpack=True ) )

returns 10, where i would expect it to return 1, to be consistent with 
the behaviour when there are multiple columns.

Is there a reason for why it is not like that?


Cheers

Davide Lasagna




___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] numpy.test() failure

2011-09-14 Thread Nils Wagner
ERROR: test_polyfit (test_polynomial.TestDocs)
--
Traceback (most recent call last):
   File 
/home/nwagner/local/lib64/python2.6/site-packages/numpy/lib/tests/test_polynomial.py,
 
line 106, in test_polyfit
 weights = arange(8,1,-1)**2/7.0
NameError: global name 'arange' is not defined

==
FAIL: Tests polyfit
--
Traceback (most recent call last):
   File 
/home/nwagner/local/lib64/python2.6/site-packages/numpy/ma/tests/test_extras.py,
 
line 622, in test_polyfit
 assert_almost_equal(a, a_)
   File 
/home/nwagner/local/lib64/python2.6/site-packages/numpy/ma/testutils.py, 
line 155, in assert_almost_equal
 err_msg=err_msg, verbose=verbose)
   File 
/home/nwagner/local/lib64/python2.6/site-packages/numpy/ma/testutils.py, 
line 221, in assert_array_almost_equal
 header='Arrays are not almost equal')
   File 
/home/nwagner/local/lib64/python2.6/site-packages/numpy/ma/testutils.py, 
line 186, in assert_array_compare
 verbose=verbose, header=header)
   File 
/home/nwagner/local/lib64/python2.6/site-packages/numpy/testing/utils.py, 
line 677, in assert_array_compare
 raise AssertionError(msg)
AssertionError:
Arrays are not almost equal

(mismatch 100.0%)
  x: array([ 4.25134878,  1.14131297,  0.20519666, 
 0.01701   ])
  y: array([ 1.9345248 ,  0.49711011,  0.10202554, 
 0.00928034])
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] numpy.test() failure

2011-09-14 Thread Ralf Gommers
On Wed, Sep 14, 2011 at 10:45 PM, Samuel John sc...@samueljohn.de wrote:

 Hi Nils,

 which version of numpy, which os?


Latest master. Due to https://github.com/numpy/numpy/commit/af22fc43

Travis, did you run the test suite? arange is used but not imported.

Ralf



 I can infer that you use python 2.6 in 64bit, right?

 Right after the beginning of the numpy.test() are some crucial information.

 bests
  Samuel

 On 14.09.2011, at 22:09, Nils Wagner wrote:

  ERROR: test_polyfit (test_polynomial.TestDocs)
  --
  Traceback (most recent call last):
File
 
 /home/nwagner/local/lib64/python2.6/site-packages/numpy/lib/tests/test_polynomial.py,
  line 106, in test_polyfit
  weights = arange(8,1,-1)**2/7.0
  NameError: global name 'arange' is not defined
 
  ==
  FAIL: Tests polyfit
  --
  Traceback (most recent call last):
File
 
 /home/nwagner/local/lib64/python2.6/site-packages/numpy/ma/tests/test_extras.py,
  line 622, in test_polyfit
  assert_almost_equal(a, a_)
File
 
 /home/nwagner/local/lib64/python2.6/site-packages/numpy/ma/testutils.py,
  line 155, in assert_almost_equal
  err_msg=err_msg, verbose=verbose)
File
 
 /home/nwagner/local/lib64/python2.6/site-packages/numpy/ma/testutils.py,
  line 221, in assert_array_almost_equal
  header='Arrays are not almost equal')
File
 
 /home/nwagner/local/lib64/python2.6/site-packages/numpy/ma/testutils.py,
  line 186, in assert_array_compare
  verbose=verbose, header=header)
File
 
 /home/nwagner/local/lib64/python2.6/site-packages/numpy/testing/utils.py,
  line 677, in assert_array_compare
  raise AssertionError(msg)
  AssertionError:
  Arrays are not almost equal
 
  (mismatch 100.0%)
   x: array([ 4.25134878,  1.14131297,  0.20519666,
  0.01701   ])
   y: array([ 1.9345248 ,  0.49711011,  0.10202554,
  0.00928034])
  ___
  NumPy-Discussion mailing list
  NumPy-Discussion@scipy.org
  http://mail.scipy.org/mailman/listinfo/numpy-discussion

 ___
 NumPy-Discussion mailing list
 NumPy-Discussion@scipy.org
 http://mail.scipy.org/mailman/listinfo/numpy-discussion

___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] numpy.test() failure

2011-09-14 Thread Charles R Harris
On Wed, Sep 14, 2011 at 2:45 PM, Samuel John sc...@samueljohn.de wrote:

 Hi Nils,

 which version of numpy, which os?
 I can infer that you use python 2.6 in 64bit, right?

 Right after the beginning of the numpy.test() are some crucial information.

 bests
  Samuel

 On 14.09.2011, at 22:09, Nils Wagner wrote:

  ERROR: test_polyfit (test_polynomial.TestDocs)
  --
  Traceback (most recent call last):
File
 
 /home/nwagner/local/lib64/python2.6/site-packages/numpy/lib/tests/test_polynomial.py,
  line 106, in test_polyfit
  weights = arange(8,1,-1)**2/7.0
  NameError: global name 'arange' is not defined
 
  ==
  FAIL: Tests polyfit
  --
  Traceback (most recent call last):
File
 
 /home/nwagner/local/lib64/python2.6/site-packages/numpy/ma/tests/test_extras.py,
  line 622, in test_polyfit
  assert_almost_equal(a, a_)
File
 
 /home/nwagner/local/lib64/python2.6/site-packages/numpy/ma/testutils.py,
  line 155, in assert_almost_equal
  err_msg=err_msg, verbose=verbose)
File
 
 /home/nwagner/local/lib64/python2.6/site-packages/numpy/ma/testutils.py,
  line 221, in assert_array_almost_equal
  header='Arrays are not almost equal')
File
 
 /home/nwagner/local/lib64/python2.6/site-packages/numpy/ma/testutils.py,
  line 186, in assert_array_compare
  verbose=verbose, header=header)
File
 
 /home/nwagner/local/lib64/python2.6/site-packages/numpy/testing/utils.py,
  line 677, in assert_array_compare
  raise AssertionError(msg)
  AssertionError:
  Arrays are not almost equal
 
  (mismatch 100.0%)
   x: array([ 4.25134878,  1.14131297,  0.20519666,
  0.01701   ])
   y: array([ 1.9345248 ,  0.49711011,  0.10202554,
  0.00928034])
  ___
  NumPy-Discussion mailing list
  NumPy-Discussion@scipy.org
  http://mail.scipy.org/mailman/listinfo/numpy-discussion


This is from Travis' push last night adding weights to polyfit.

Travis, pretty much everything needs undergo review and testing before
commits no matter how trivial it may look.

Chuck
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] load from text files Pull Request Review

2011-09-14 Thread Christopher Barker
On 9/14/11 1:01 PM, Christopher Barker wrote:
 numpy.ndarray.resize is a different method, and I'm pretty sure it
 should be as fast or faster that np.empty + np.append.

My profile:

In [25]: %timeit f1 # numpy.resize()
1000 loops, best of 3: 163 ns per loop

In [26]: %timeit f2 #numpy.ndarray.resize()
1000 loops, best of 3: 136 ns per loop

In [27]: %timeit f3 # numpy.empty() + append()
1000 loops, best of 3: 136 ns per loop


those last two couldn't b more identical!

(though this is an excercise in unrequired optimization!)


My test code:

#!/usr/bin/env python


test_resize

A test of various numpy re-sizing options



import numpy

def f1():
 
 numpy.resize
 

 l = 100
 a = numpy.zeros((l,))
 for i in xrange(1000):
 l += l
 a = numpy.resize(a, (l,) )

 return None

def f2():
 
 numpy.ndarray.resize
 

 l = 100
 a = numpy.zeros((l,))
 for i in xrange(1000):
 l += l
 a.resize(a, (l,) )

 return None

def f3():
 
 numpy.empty + append
 

 l = 100
 a = numpy.zeros((l,))
 for i in xrange(1000):
 b = np.empty((l,))
 a.append(b)

 return None





-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

chris.bar...@noaa.gov
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] load from text files Pull Request Review

2011-09-14 Thread Benjamin Root
On Wed, Sep 14, 2011 at 4:25 PM, Christopher Barker
chris.bar...@noaa.govwrote:

 On 9/14/11 1:01 PM, Christopher Barker wrote:
  numpy.ndarray.resize is a different method, and I'm pretty sure it
  should be as fast or faster that np.empty + np.append.

 My profile:

 In [25]: %timeit f1 # numpy.resize()
 1000 loops, best of 3: 163 ns per loop

 In [26]: %timeit f2 #numpy.ndarray.resize()
 1000 loops, best of 3: 136 ns per loop

 In [27]: %timeit f3 # numpy.empty() + append()
 1000 loops, best of 3: 136 ns per loop


 those last two couldn't b more identical!

 (though this is an excercise in unrequired optimization!)


Are you sure the f2 code works?  a.resize() takes only a shape tuple.  As
coded, you should get an exception.

Ben Root
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] load from text files Pull Request Review

2011-09-14 Thread Christopher Barker
On 9/14/11 2:41 PM, Benjamin Root wrote:
 Are you sure the f2 code works?  a.resize() takes only a shape tuple.  As
 coded, you should get an exception.

wow, what an idiot!

I think I just timed how long it takes to raise that exception...

And when I fix that, I get a memory error.

When I fix that, I find that f3() wasn't doing the right thing. What an 
astonishing lack of attention on my part!

Here it is again, working, I hope!

In [107]: %timeit f1()
10 loops, best of 3: 50.7 ms per loop

In [108]: %timeit f2()
1000 loops, best of 3: 719 us per loop

In [109]: %timeit f3()
100 loops, best of 3: 19 ms per loop


So:
numpy.resize() is the slowest
numpy.empty+ numpy.append() is faster
numpy.ndarray.resize() is the fastest

Which matches my expectations, for once!

-Chris
The code:

#!/usr/bin/env python


test_resize

A test of various numpy re-sizing options



import numpy

def f1():
 
 numpy.resize
 

 extra = 100
 l = extra
 a = numpy.zeros((l,))
 for i in xrange(100):
 l += extra
 a = numpy.resize(a, (l,) )

 return a

def f2():
 
 numpy.ndarray.resize
 

 extra = 100
 l = extra
 a = numpy.zeros((l,))
 for i in xrange(100):
 l += extra
 a.resize( (l,) )

 return a

def f3():
 
 numpy.empty + append
 

 extra = 100
 l = extra
 a = numpy.zeros((l,))
 for i in xrange(100):
 b = numpy.empty((extra,))
 a = numpy.append(a, b)
 return a

a1 = f1()
a2 = f2()
a3 = f3()

if a1.shape == a2.shape == a3.shape:
 print they are all returning the same size array
else:
 print Something is wrong!


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

chris.bar...@noaa.gov
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] load from text files Pull Request Review

2011-09-14 Thread Christopher Jordan-Squire
On Wed, Sep 14, 2011 at 5:30 PM, Christopher Barker
chris.bar...@noaa.gov wrote:
 On 9/14/11 2:41 PM, Benjamin Root wrote:
 Are you sure the f2 code works?  a.resize() takes only a shape tuple.  As
 coded, you should get an exception.

 wow, what an idiot!

 I think I just timed how long it takes to raise that exception...

 And when I fix that, I get a memory error.

 When I fix that, I find that f3() wasn't doing the right thing. What an
 astonishing lack of attention on my part!

 Here it is again, working, I hope!

 In [107]: %timeit f1()
 10 loops, best of 3: 50.7 ms per loop

 In [108]: %timeit f2()
 1000 loops, best of 3: 719 us per loop

 In [109]: %timeit f3()
 100 loops, best of 3: 19 ms per loop


 So:
 numpy.resize() is the slowest
 numpy.empty+ numpy.append() is faster
 numpy.ndarray.resize() is the fastest

 Which matches my expectations, for once!


Good catch! I didn't think the difference between np.resize and
ndarray.resize would matter. (And I was getting inscrutable errors
when I called ndarray.resize that told me to use np.resize instead.)

-Chris JS


 -Chris
 The code:

 #!/usr/bin/env python

 
 test_resize

 A test of various numpy re-sizing options

 

 import numpy

 def f1():
     
     numpy.resize
     

     extra = 100
     l = extra
     a = numpy.zeros((l,))
     for i in xrange(100):
         l += extra
         a = numpy.resize(a, (l,) )

     return a

 def f2():
     
     numpy.ndarray.resize
     

     extra = 100
     l = extra
     a = numpy.zeros((l,))
     for i in xrange(100):
         l += extra
         a.resize( (l,) )

     return a

 def f3():
     
     numpy.empty + append
     

     extra = 100
     l = extra
     a = numpy.zeros((l,))
     for i in xrange(100):
         b = numpy.empty((extra,))
         a = numpy.append(a, b)
     return a

 a1 = f1()
 a2 = f2()
 a3 = f3()

 if a1.shape == a2.shape == a3.shape:
     print they are all returning the same size array
 else:
     print Something is wrong!


 --
 Christopher Barker, Ph.D.
 Oceanographer

 Emergency Response Division
 NOAA/NOS/ORR            (206) 526-6959   voice
 7600 Sand Point Way NE   (206) 526-6329   fax
 Seattle, WA  98115       (206) 526-6317   main reception

 chris.bar...@noaa.gov
 ___
 NumPy-Discussion mailing list
 NumPy-Discussion@scipy.org
 http://mail.scipy.org/mailman/listinfo/numpy-discussion

___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] Polynomial implementation in numpy.ma

2011-09-14 Thread Stéfan van der Walt
Hi all,

There were some failures in the polynomial tests earlier today, and
while investigating I saw that numpy.ma implements its own root
finder.  It uses inversion of a Van der Monde matrix, which I believe
may suffer from some numerical instability problems.  Given that
Charles has gone to some length to implement good polynomial root
finders, I think it would be best to employ those instead, and simply
pre-filter the data that comes from the masked array module, if
possible.

Regards
Stéfan
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] 1.7.x release of NumPy

2011-09-14 Thread Travis Oliphant
Hi all, 

Has there been a discussion of a 1.7.x release of NumPy? There are a few 
new features that should go into the 1.x release of NumPy, that don't require 
the ABI changes of 2.0.I thought I had heard Mark talk in support of such a 
thing.  

What are the plans for the release of NumPy 2.0? 

Between my experiences over the last 4 years of working on real-world projects, 
the data array summit, SciPy, and conversations with Mark Wiebe, Peter Wang, 
Wes McKinney and others over the past months,  there is a collection of pretty 
concrete ideas emerging about where the next version of NumPy should go.
Some of these can be folded into NumPy 2.0 (and even 1.7), but my mind is 
racing around NumPy 3.0 at this point. 


-Travis


___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] 1.7.x release of NumPy

2011-09-14 Thread Ralf Gommers
On Thu, Sep 15, 2011 at 5:32 AM, Travis Oliphant teoliph...@gmail.comwrote:

 Hi all,

 Has there been a discussion of a 1.7.x release of NumPy? There are a
 few new features that should go into the 1.x release of NumPy, that don't
 require the ABI changes of 2.0.I thought I had heard Mark talk in
 support of such a thing.


A little. I think our 6-month release cycle is working pretty well, which
means a 1.7.0 release around mid-November. There are definitely enough new
features for a solid release already, but I have the impression that it
wouldn't hurt for the missing data functionality to get exercised a bit
more.


 What are the plans for the release of NumPy 2.0?

 Mark and others have been very good at maintaining ABI compatibility. At
the same time the numpy-refactor branch has dropped off the radar (any
news/plans?). So I'm wondering what would go into 2.0 that is ready now or
soon?

Ralf
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion