Re: [Numpy-discussion] Unhandled floating point exception running test in numpy-1.0.3 and svn 3875

2007-06-24 Thread Charles R Harris

On 6/23/07, rex [EMAIL PROTECTED] wrote:


Stefan van der Walt [EMAIL PROTECTED] [2007-06-23 15:06]:

 On Sat, Jun 23, 2007 at 07:35:35PM +, John Ollinger wrote:
 
  I have just been updating our version of Python, numpy and scipy and
have run
  into a floating point exception that crashes Python when I test the
release.
 



What do you mean by crash? Is anything printed? Do older versions of numpy
still work?


 I am running gcc 3.3.1 on SuSe Linux 2.4.21-144-smp4G.  The error first
occurred
  with numpy-1.0.3.  I downloaded svn 3875 when I then read the scipy
web page and
  installed the latest subversion. The test command I am using is
 
  python -c 'import numpy; numpy.test(level=1,verbosity==2)'
 
  and occurs during the matvec test.  This test uses rand to generate
  10x8 and 8x1

 It may be worth checking whether the new version of numpy is picked
 up.  You can do that using

 import numpy as N
 print N.__version__

 We have a build slave with a very similar setup to yours (see
 http://buildbot.scipy.org) and everything seems to be fine.

It's somewhat different:
SUSE 10.2
Core 2 Duo 32-bit
Kernel 2.6.18.2-34-default
gcc version 4.1.2 20061115 (prerelease) (SUSE Linux)
Python 2.5 (r25:51908, Nov 27 2006
print N.__version__
1.0.4.dev3868
python -c 'import numpy; numpy.test(level=1,verbosity=2)'
[...]
Ran 590 tests in 0.473s



Do you use Atlas? If so, did you compile it yourself or did you use a
package? There is a bug in some older 64 bit Atlas packages running on newer
intel hardware that generates illegal instruction exceptions and I am
wondering if you may have found a new 32 bit bug. One way to check this is
to multiply two big matrices together. There are many paths through Atlas,
so the known bug is not encountered in all matrix multiplications, and
perhaps not for all floating values either.

Chuck
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] [ANN]New numpy, scipy and atlas rpms for FC 5, 6 and 7 and openSUSE (with 64 bits arch support)

2007-06-24 Thread David Cournapeau
Hi there,
   
After quite some pain, I finally managed to build a LAPACK + ATLAS 
rpm useful for  numpy and scipy. Read the following if you use Fedora 
Core or OpenSuse and are tired to install unsuccessfully numpy, scipy, 
BLAS, LAPACK or ATLAS. Instructions are given there:

http://www.scipy.org/Installing_SciPy/Linux (ashigabou repository)

Basically:
- Fedora Core 5, 6  and 7 and openSUSE 10.2 are supported (x86, and 
x86_64 for FC 7 and openSuse).
- binary rpms for numpy, scipy and blas/lapack dependencies.
- source rpm for atlas, for a really easy, 3 commands build of ATLAS 
(should work for both x86 and x86_64).
 
numpy and scipy are the last releases, including some backported 
changes to make it work on 64 bits. Atlas is the last developement 
version, with a trivial patch to build shared blas and lapack which can 
be used as drop in replacements for netlib blas and lapack.
I would like to hear people complains. If people want other 
distributions supported by the opensuse build system (such as mandriva), 
I would like to hear it too.

cheers,

David
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Unhandled floating point exception running test in numpy-1.0.3 and svn 3875

2007-06-24 Thread rex
Charles R Harris [EMAIL PROTECTED] [2007-06-24 06:22]:
 
 
 On 6/23/07, rex [EMAIL PROTECTED] wrote:
 
 Stefan van der Walt [EMAIL PROTECTED] [2007-06-23 15:06]:

 On Sat, Jun 23, 2007 at 07:35:35PM +, John Ollinger wrote:
 I have just been updating our version of Python, numpy and
 scipy and have run into a floating point exception that crashes
 Python when I test the release.
 
 What do you mean by crash? Is anything printed? Do older versions of numpy
 still work?

John needs to respond to this.
 
 I am running gcc 3.3.1 on SuSe Linux 2.4.21-144-smp4G.  The error
 first occurred with numpy-1.0.3.  I downloaded svn 3875 when I then
 read the scipy web page and installed the latest subversion. The
 test command I am using is  python -c 'import numpy;
 numpy.test(level=1,verbosity==2)'  and occurs during the matvec
 test.  This test uses rand to generate 10x8 and 8x1

 It may be worth checking whether the new version of numpy is picked
 up.  You can do that using

 import numpy as N
  print N.__version__
 
  We have a build slave with a very similar setup to yours (see
  http://buildbot.scipy.org ) and everything seems to be fine.
 
 It's somewhat different:
 SUSE 10.2
 Core 2 Duo 32-bit
 Kernel 2.6.18.2-34-default
 gcc version 4.1.2 20061115 (prerelease) (SUSE Linux)
 Python 2.5 (r25:51908, Nov 27 2006
 print N.__version__
 1.0.4.dev3868
 python -c 'import numpy; numpy.test(level=1,verbosity=2)'
 [...]
 Ran 590 tests in 0.473s
 
 
 Do you use Atlas? If so, did you compile it yourself or did you use a package?
 There is a bug in some older 64 bit Atlas packages running on newer intel
 hardware that generates illegal instruction exceptions and I am wondering if
 you may have found a new 32 bit bug. One way to check this is to multiply two
 big matrices together. There are many paths through Atlas, so the known bug is
 not encountered in all matrix multiplications, and perhaps not for all 
 floating
 values either.

The above system is running the http://buildbot.scipy.org/ buildbot with
no errors. It doesn't appear to build ATLAS. It's John's older system
(gcc 3.3.1 2.4.21-144-smp4G) -- AFAIK, 2.4.21 was used in SUSE
9.0. Current version is 10.2 -- that is throwing an error, not mine.

-rex
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] Help installing numpy 1.0.2 on LINUX

2007-06-24 Thread John Pruce
I am trying to install nunpy 1.0.2 on aMandrake Linux system kernel 2.6.17mdk.
I have followed the Install instructions in numpy.

I am including a small portion of the python setup.py install command:

Running from numpy source directory.
F2PY Version 2_3649
blas_opt_info:
blas_mkl_info:
   libraries mkl,vml,guide not found in /usr/local/lib/atlas
   NOT AVAILABLE

atlas_blas_threads_info:
Setting PTATLAS=ATLAS
   libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib/atlas
   NOT AVAILABLE

atlas_blas_info:
   FOUND:
 libraries = ['f77blas', 'cblas', 'atlas']
 library_dirs = ['/usr/local/lib/atlas']
 language = c

Could not locate executable g77
Could not locate executable f95
customize GnuFCompiler
customize GnuFCompiler
customize GnuFCompiler using config
compiling '_configtest.c':

/* This file is generated from numpy_distutils/system_info.py */
void ATL_buildinfo(void);
int main(void) {
   ATL_buildinfo();
   return 0;
}
C compiler: gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall 
-Wstrict-prototypes -fPIC

compile options: '-c'
gcc: _configtest.c
gcc -pthread _configtest.o -L/usr/local/lib/atlas -lf77blas -lcblas 
-latlas -o _configtest
ATLAS version 3.6.0 built by root on Fri Jun 15 18:59:04 EDT 2007:
UNAME: Linux localhost 2.6.17-5mdv #1 SMP Wed Sep 13 14:32:31 
EDT 2006 i686 Celeron (Mendocino) GNU/Linux
INSTFLG  :
MMDEF:
ARCHDEF  :
F2CDEFS  : -DAdd__ -DStringSunStyle
CACHEEDGE: 131072
F77  : /usr/local//gcc2.95.3/bin/g77, version GNU Fortran 
0.5.25 20010315 (release)
F77FLAGS : -fomit-frame-pointer -O
CC   : /usr/local/gcc2.95.3/bin/gcc, version 2.95.3
CC FLAGS : -fomit-frame-pointer -O3 -funroll-all-loops
MCC  : /usr/local/gcc2.95.3/bin/gcc, version 2.95.3
MCCFLAGS : -fomit-frame-pointer -O
success!
removing: _configtest.c _configtest.o _configtest
   FOUND:
 libraries = ['f77blas', 'cblas', 'atlas']
 library_dirs = ['/usr/local/lib/atlas']
 language = c
 define_macros = [('ATLAS_INFO', '\\3.6.0\\')]

lapack_opt_info:
lapack_mkl_info:
mkl_info:
   libraries mkl,vml,guide not found in /usr/local/lib/atlas
   NOT AVAILABLE

   NOT AVAILABLE

atlas_threads_info:
Setting PTATLAS=ATLAS
   libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib/atlas
   libraries lapack_atlas not found in /usr/local/lib/atlas
numpy.distutils.system_info.atlas_threads_info
   NOT AVAILABLE

atlas_info:
   libraries lapack_atlas not found in /usr/local/lib/atlas
numpy.distutils.system_info.atlas_info
   FOUND:
 libraries = ['lapack', 'f77blas', 'cblas', 'atlas']
 library_dirs = ['/usr/local/lib/atlas']
 language = f77

customize GnuFCompiler
customize GnuFCompiler
customize GnuFCompiler using config
compiling '_configtest.c':

/* This file is generated from numpy_distutils/system_info.py */
void ATL_buildinfo(void);
int main(void) {
   ATL_buildinfo();
   return 0;
}
C compiler: gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall 
-Wstrict-prototypes -fPIC

compile options: '-c'
gcc: _configtest.c
gcc -pthread _configtest.o -L/usr/local/lib/atlas -llapack -lf77blas 
-lcblas -latlas -o _configtest
ATLAS version 3.6.0 built by root on Fri Jun 15 18:59:04 EDT 2007:
UNAME: Linux localhost 2.6.17-5mdv #1 SMP Wed Sep 13 14:32:31 
EDT 2006 i686 Celeron (Mendocino) GNU/Linux
INSTFLG  :
MMDEF:
ARCHDEF  :
F2CDEFS  : -DAdd__ -DStringSunStyle
CACHEEDGE: 131072
F77  : /usr/local//gcc2.95.3/bin/g77, version GNU Fortran 
0.5.25 20010315 (release)
F77FLAGS : -fomit-frame-pointer -O
CC   : /usr/local/gcc2.95.3/bin/gcc, version 2.95.3
CC FLAGS : -fomit-frame-pointer -O3 -funroll-all-loops
MCC  : /usr/local/gcc2.95.3/bin/gcc, version 2.95.3
MCCFLAGS : -fomit-frame-pointer -O
success!
removing: _configtest.c _configtest.o _configtest
   FOUND:
 libraries = ['lapack', 'f77blas', 'cblas', 'atlas']
 library_dirs = ['/usr/local/lib/atlas']
 language = f77
 define_macros = [('ATLAS_INFO', '\\3.6.0\\')]

running install
running build
running config_fc
running build_src
building py_modules sources
creating build/src.linux-i686-2.5
creating build/src.linux-i686-2.5/numpy
creating build/src.linux-i686-2.5/numpy/distutils
building extension numpy.core.multiarray sources
creating build/src.linux-i686-2.5/numpy/core
Generating build/src.linux-i686-2.5/numpy/core/config.h
customize GnuFCompiler
customize GnuFCompiler
customize GnuFCompiler using config
C compiler: gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall 
-Wstrict-prototypes -fPIC

When I try to run numpy.test(level=1) I get:

 import numpy
 numpy.test(level=1)
Traceback (most recent call last)
   File stdln. line 1, in  module
AttributeError: 'module' has no attribute 'test'


Thank you for your help or suggestions.

John



-- 
___
Surf the Web in a faster, safer and easier way:
Download Opera 9 at http://www.opera.com


Re: [Numpy-discussion] Help installing numpy 1.0.2 on LINUX

2007-06-24 Thread Stefan van der Walt
On Sun, Jun 24, 2007 at 05:58:33PM +0100, John Pruce wrote:
 When I try to run numpy.test(level=1) I get:
 
  import numpy
  numpy.test(level=1)
 Traceback (most recent call last)
File stdln. line 1, in  module
 AttributeError: 'module' has no attribute 'test'
 
 
 Thank you for your help or suggestions.

Are you running from the numpy source directory?  If so, change out of
it and try again.

Stéfan
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Help installing numpy 1.0.2 on LINUX

2007-06-24 Thread John Pruce

 - Original Message -
 From: Stefan van der Walt [EMAIL PROTECTED]
 To: numpy-discussion@scipy.org
 Subject: Re: [Numpy-discussion] Help installing numpy 1.0.2 on LINUX
 Date: Sun, 24 Jun 2007 19:48:14 +0200
 
 
 On Sun, Jun 24, 2007 at 05:58:33PM +0100, John Pruce wrote:
  When I try to run numpy.test(level=1) I get:
 
   import numpy
   numpy.test(level=1)
  Traceback (most recent call last)
 File stdln. line 1, in  module
  AttributeError: 'module' has no attribute 'test'
  
 
  Thank you for your help or suggestions.
 
 Are you running from the numpy source directory?  If so, change out of
 it and try again.
 
 Stéfan
 ___
 Numpy-discussion mailing list
 Numpy-discussion@scipy.org
 http://projects.scipy.org/mailman/listinfo/numpy-discussion

 Thank you That was the problem

John


-- 
___
Surf the Web in a faster, safer and easier way:
Download Opera 9 at http://www.opera.com

Powered by Outblaze
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Unhandled floating point exception running test in numpy-1.0.3 and svn 3875

2007-06-24 Thread John Ollinger


At 11:09 AM 6/24/2007, you wrote:

On 6/24/07, rex
[EMAIL PROTECTED]
wrote:


Charles R Harris

[EMAIL PROTECTED] [2007-06-24 06:22]:





 On 6/23/07, rex
[EMAIL PROTECTED] wrote:




 Stefan van der Walt
[EMAIL PROTECTED]
[2007-06-23 15:06]:



 On Sat, Jun 23, 2007 at 07:35:35PM +, John Ollinger
wrote:

 I have just been updating our version of Python, numpy
and 

 scipy and have run into a floating point exception that
crashes

 Python when I test the release.



 What do you mean by crash? Is anything printed? Do older
versions of numpy

 still work?

John needs to respond to this.

 I am running gcc 3.3.1 on SuSe Linux
2.4.21-144-smp4G. The error

 first occurred with numpy-1.0.3. I downloaded svn
3875 when I then 

 read the scipy web page and installed the latest
subversion. The

 test command I am using is  python -c
'import numpy;

 numpy.test(level=1,verbosity==2)'  and
occurs during the matvec 

 test. This test uses rand to generate 10x8 and
8x1



 It may be worth checking whether the new version of numpy is
picked

 up. You can do that using



 import numpy as N 

  print N.__version__

 

  We have a build slave with a very
similar setup to yours (see

 
http://buildbot.scipy.org ) and
everything seems to be fine. 



 It's somewhat different:

 SUSE 10.2

 Core 2 Duo 32-bit

 Kernel 2.6.18.2-34-default

 gcc version 4.1.2 20061115 (prerelease)
(SUSE Linux)

 Python 2.5 (r25:51908, Nov 27 2006

 print N.__version__

 1.0.4.dev3868

 python -c 'import numpy;
numpy.test(level=1,verbosity=2)'

 [...]

 Ran 590 tests in 0.473s





 Do you use Atlas? If so, did you compile it yourself or did you
use a package?

 There is a bug in some older 64 bit Atlas packages running on
newer intel

 hardware that generates illegal instruction exceptions and I am
wondering if 

 you may have found a new 32 bit bug. One way to check this is to
multiply two

 big matrices together. There are many paths through Atlas, so
the known bug is

 not encountered in all matrix multiplications, and perhaps not
for all floating 

 values either.

The above system is running the
http://buildbot.scipy.org/
buildbot with

no errors. It doesn't appear to build ATLAS. It's John's older system


(gcc 3.3.1 2.4.21-144-smp4G) -- AFAIK, 2.4.21 was used in SUSE

9.0. Current version is 10.2 -- that is throwing an error, not
mine.


Sorry, my mistake. And I misread 2.4.21 as 2.6.21, a very recent kernel.
Just shows how fast the years pass by. 
Chuck 
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org

http://projects.scipy.org/mailman/listinfo/numpy-discussion

You hit the nail on the head. It is apparently an Atlas
problem. I originally built numpy with optimized Atlas
libraries. When I deleted these from the site.cfg file the problem
went away.
I apologize for not including the error message in my initial post. Here
it is in case anyone cares:
check_matvec (numpy.core.tests.test_numeric.test_dot)Floating point
exception
I appreciate the helpful responses. I will fool around with Atlas
to see if I can eliminate the problem. I have to do stuff that
makes people want to pay for part of today, so I might not post again for
a day or two.
Thanks again,
John



___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Unhandled floating point exception running test in numpy-1.0.3 and svn 3875

2007-06-24 Thread rex
John Ollinger [EMAIL PROTECTED] [2007-06-24 13:13]:
  I am running gcc 3.3.1 on SuSe Linux 2.4.21-144-smp4G.  The error
  first occurred with numpy-1.0.3.  I downloaded svn 3875 when I 
 then
  read the scipy web page and installed the latest subversion. The
  test command I am using is  python -c 'import numpy;
  numpy.test(level=1,verbosity==2)'  and occurs during the matvec
  test.  This test uses rand to generate 10x8 and 8x1
 
 You hit the nail on the head.  It is apparently an Atlas problem.  I 
 originally
 built numpy with optimized Atlas libraries.  When I deleted these from the
 site.cfg file the problem went away.
 
 I apologize for not including the error message in my initial post. Here it is
 in case anyone cares:
 
 check_matvec (numpy.core.tests.test_numeric.test_dot)Floating point exception

I recently built (using David Cournapeau's garnumpy) numpy and scipy
using ATLAS 3.7.33, gfortran, gcc 4.1.2, SUSE 10.2 (x86 kernel
2.6.18.2-34-default), and python 2.5:

python
Python 2.5 (r25:51908, Nov 27 2006, 19:14:46)
[GCC 4.1.2 20061115 (prerelease) (SUSE Linux)] on linux2
Type help, copyright, credits or license for more information.
 import numpy
 import scipy
 print numpy.__version__
1.0.1
 print scipy.__version__
0.5.2
  numpy.test(level=1,verbosity=2)
[...]
Ran 526 tests in 0.432s

OK
  scipy.test(level=1,verbosity=2)
[...]
Ran 1596 tests in 2.942s

OK

There doesn't appear to be a problem with recent versions of the
software. In particular, ATLAS 3.7.33 does not cause an error.

Is there some reason for you to use such old software? (gcc 3.3.1 
kernel 2.4.21)? What platform are you building for?

-rex
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] PCA - Principal Component Analysis

2007-06-24 Thread Alex Torquato S. Carneiro
I'm doing some projects in Python (system GNU / Linux - Ubuntu 7.0) about image 
processing. I'm needing a implementation of PCA, prefer to library for apt-get.

Thanks.
Alex.





   

Novo Yahoo! Cadê? - Experimente uma nova busca.
http://yahoo.com.br/oqueeuganhocomisso ___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] qr decomposition with column pivoting/qr decomposition with householder reflections

2007-06-24 Thread traveller3141

I'm in the process of trying to convert some Matlab code into Python.
There's a statement of the form:

[q,r,e] = qr(A)

which performs a qr-decomposition of A, but then also returns a
'permutation' matrix. The purpose of this is to ensure that the values along
r's diagonal are decreasing. I believe this technique is called qr
decomposition with column pivoting or (equivalently) qr decomposition with
householder reflections.

I have not been able to find an implementation of this within numpy. Does
one exist? Or should I come to truly understand this algorithm (prob'ly a
good idea regardless) and implement it?

Thanks,
Steven
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] qr decomposition with column pivoting/qr decomposition with householder reflections

2007-06-24 Thread Charles R Harris

On 6/21/07, traveller3141 [EMAIL PROTECTED] wrote:


I'm in the process of trying to convert some Matlab code into Python.
There's a statement of the form:

[q,r,e] = qr(A)

which performs a qr-decomposition of A, but then also returns a
'permutation' matrix. The purpose of this is to ensure that the values along
r's diagonal are decreasing. I believe this technique is called qr
decomposition with column pivoting or (equivalently) qr decomposition with
householder reflections.



There is a qr version in numpy, numpy.linalg.qr, but it only returns the
factors q and r. The underlying lapack routines are {dz}geqrf and {dz}orgqr,
the latter converting the product of Householder reflections into the
orthogonal matrix q. Column pivoting is not used in {dz}geqrf, but it *is*
used in {dz}geqpf.  The versions with column pivoting are probably more
accurate and also allow fixing certain columns to the front of the array, a
useful thing in some cases, so I don't know why we chose the first rather
than the second. I suspect the decision was made in Numeric long ago and the
simplest function was chosen. The column pivoting version isn't in scipy
either and it probably should be. If you need it, it shouldn't be hard to
add.

Chuck
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] PCA - Principal Component Analysis

2007-06-24 Thread Rob Clewley
IMO the Modular toolkit for Data Processing (MDP) has a fairly good
and straightforward PCA implementation, among other good tools:
mdp-toolkit.sourceforge.net/

I have no idea what apt-get is, though, so I don't know if this will
be helpful or not!

-Rob

On 21/06/07, Alex Torquato S. Carneiro [EMAIL PROTECTED] wrote:

 I'm doing some projects in Python (system GNU / Linux - Ubuntu 7.0) about
 image processing. I'm needing a implementation of PCA, prefer to library for
 apt-get.

 Thanks.
 Alex.


  
 Novo Yahoo! Cadê? - Experimente uma nova busca.
 ___
 Numpy-discussion mailing list
 Numpy-discussion@scipy.org
 http://projects.scipy.org/mailman/listinfo/numpy-discussion


___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] PCA - Principal Component Analysis

2007-06-24 Thread Charles R Harris

On 6/24/07, Rob Clewley [EMAIL PROTECTED] wrote:


IMO the Modular toolkit for Data Processing (MDP) has a fairly good
and straightforward PCA implementation, among other good tools:
mdp-toolkit.sourceforge.net/

I have no idea what apt-get is, though, so I don't know if this will
be helpful or not!

-Rob



Apt-get fetches and installs packages for Debian and Debian based Linux
distributions like Ubuntu.

Chuck
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion