Re: [Numpy-discussion] Help using numPy to create a very large multi dimensional array

2007-04-18 Thread Gael Varoquaux
On Wed, Apr 18, 2007 at 06:09:38PM -0500, Nick Fotopoulos wrote: > Devs, is there any possibility of moving/copying pylab.load to numpy? +1 Gaël ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/num

Re: [Numpy-discussion] building numpy with atlas on ubuntu edgy

2007-04-18 Thread Robert Kern
Charles R Harris wrote: > > On 4/18/07, *Robert Kern* <[EMAIL PROTECTED] > > wrote: > > Charles R Harris wrote: > > I'm wondering if the static libraries could simply be compiled > with the > > -fPIC flag and linked with the program to produce the dynamic

Re: [Numpy-discussion] building numpy with atlas on ubuntu edgy

2007-04-18 Thread Charles R Harris
On 4/18/07, Robert Kern <[EMAIL PROTECTED]> wrote: Charles R Harris wrote: > I'm wondering if the static libraries could simply be compiled with the > -fPIC flag and linked with the program to produce the dynamic library. > The static libraries are just collections of *.o files, so I don't see >

Re: [Numpy-discussion] building numpy with atlas on ubuntu edgy

2007-04-18 Thread Robert Kern
David Cournapeau wrote: > Robert Kern wrote: >> Charles R Harris wrote: >>> I'm wondering if the static libraries could simply be compiled with the >>> -fPIC flag and linked with the program to produce the dynamic library. >>> The static libraries are just collections of *.o files, so I don't see >

Re: [Numpy-discussion] building numpy with atlas on ubuntu edgy

2007-04-18 Thread David Cournapeau
Robert Kern wrote: > Charles R Harris wrote: >> I'm wondering if the static libraries could simply be compiled with the >> -fPIC flag and linked with the program to produce the dynamic library. >> The static libraries are just collections of *.o files, so I don't see >> why that shouldn't work. > >

Re: [Numpy-discussion] building numpy with atlas on ubuntu edgy

2007-04-18 Thread David Cournapeau
Charles R Harris wrote: > > > On 4/18/07, *Keith Goodman* <[EMAIL PROTECTED] > > wrote: > > On 4/18/07, Charles R Harris <[EMAIL PROTECTED] > > wrote: > > On 4/18/07, Keith Goodman <[EMAIL PROTECTED] > >

Re: [Numpy-discussion] building numpy with atlas on ubuntu edgy

2007-04-18 Thread Robert Kern
Charles R Harris wrote: > I'm wondering if the static libraries could simply be compiled with the > -fPIC flag and linked with the program to produce the dynamic library. > The static libraries are just collections of *.o files, so I don't see > why that shouldn't work. I don't think there is a re

Re: [Numpy-discussion] building numpy with atlas on ubuntu edgy

2007-04-18 Thread Charles R Harris
On 4/18/07, David Cournapeau <[EMAIL PROTECTED]> wrote: Robert Kern wrote: > Charles R Harris wrote: > > >> I don't know which is best, although I suspect the statically linked >> version will be larger. It might seem that just pulling in the gemm >> routines wouldn't add much, but they pull in

Re: [Numpy-discussion] building numpy with atlas on ubuntu edgy

2007-04-18 Thread David Cournapeau
Robert Kern wrote: > Charles R Harris wrote: > > >> I don't know which is best, although I suspect the statically linked >> version will be larger. It might seem that just pulling in the gemm >> routines wouldn't add much, but they pull in lots of supporting >> routines. To get numpy to link sta

Re: [Numpy-discussion] building numpy with atlas on ubuntu edgy

2007-04-18 Thread Peter C. Norton
I'm having great difficulty building numpy on solaris with the sun compilers and libsunperf. I may try this on ubuntu x86_64 to see if the setup is less painful. Thanks for the idea, -Peter On Wed, Apr 18, 2007 at 11:04:26PM +0200, Christian Marquardt wrote: > Sun has recently released their com

Re: [Numpy-discussion] Help using numPy to create a very large multi dimensional array

2007-04-18 Thread Nick Fotopoulos
On 4/18/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > -- > > Message: 5 > Date: Wed, 18 Apr 2007 09:11:32 -0700 > From: Christopher Barker <[EMAIL PROTECTED]> > Subject: Re: [Numpy-discussion] Help using numPy to create a very > large multi dimensional ar

Re: [Numpy-discussion] Efficient operator overloading

2007-04-18 Thread Daniel Wheeler
On Apr 18, 2007, at 6:31 PM, Timothy Hochberg wrote: On 4/18/07, Sturla Molden <[EMAIL PROTECTED]> wrote: I'd really like to see a Python extension library do this one day. It would be very cool and (almost) as efficient as plain Fortran - though not quite, we would still get some small tem

Re: [Numpy-discussion] Efficient operator overloading

2007-04-18 Thread Xavier Gnata
Sturla Molden wrote: >> Timothy Hochberg wrote: >> > > >> Correct me if I'm wrong but it is not possible to code something working >> like boost++ in python. >> It is due to the fact we cannot overload the = operator in python. As a >> result you cannot implement the way boost++ works : + *

Re: [Numpy-discussion] Efficient operator overloading

2007-04-18 Thread Sturla Molden
> On Wednesday 18 April 2007 20:14, Sturla Molden wrote: > This case will require some extra work. The array needs to remember, > that there is an unevaluated expression depending on it. This is certainly a complication that needs to be worked out. An array could store a set of dependent expressi

Re: [Numpy-discussion] Efficient operator overloading

2007-04-18 Thread Eike Welk
On Wednesday 18 April 2007 20:14, Sturla Molden wrote: > a[i] = 2.0 # The expression 'a * b + c * d' gets evaluated. The >             # object referred to by y now holds an actual array. >             # Finally, 2.0 is written to a[i]. This case will require some extra work. The array needs to re

Re: [Numpy-discussion] Efficient operator overloading

2007-04-18 Thread Perry Greenfield
On Apr 18, 2007, at 2:14 PM, Sturla Molden wrote: [...] > > Let us assume again we have an expression like > > y = a * b + c * d > > where a,b,c and d are all arrays or matrices. In this case, the > overloaded * and + operators woud not return a temporary array but an > unevaluated expression of

Re: [Numpy-discussion] building numpy with atlas on ubuntu edgy

2007-04-18 Thread Christian Marquardt
Sun has recently released their compilers under an opensource license for Linux as well (Sun Studio Express or something), including their perflib - which includes Blas and Lapack. Has somebody tried how that combination performs, compared to Intel MKL or Atlas? I think they are free even for comme

[Numpy-discussion] Scimark, icc, & Core 2 Duo

2007-04-18 Thread rex
Keith Goodman <[EMAIL PROTECTED]> [2007-04-18 12:46]: > Thanks for that. For a variety of reasons I'm sticking with atlas. > Does the parallel flag give you a big speed increase? I imagine it > speeds things up more for larger matrices. Surprisingly little. Below are the results of running Scimar

Re: [Numpy-discussion] Efficient operator overloading

2007-04-18 Thread Eike Welk
In the SciPy sandbox there is a module that goes into this direction. It was mentioned in the other optimization thread. numexpr: http://projects.scipy.org/scipy/scipy/browser/trunk/Lib/sandbox/numexpr This module needs to be combined with a derived array class where the operators return unevalu

Re: [Numpy-discussion] Efficient operator overloading

2007-04-18 Thread Sturla Molden
> Timothy Hochberg wrote: > Correct me if I'm wrong but it is not possible to code something working > like boost++ in python. > It is due to the fact we cannot overload the = operator in python. As a > result you cannot implement the way boost++ works : + * - / operators > build a tree and all th

Re: [Numpy-discussion] building numpy with atlas on ubuntu edgy

2007-04-18 Thread rex
Andrew Straw <[EMAIL PROTECTED]> [2007-04-18 13:22]: > rex wrote: > > If your use is entirely non-commercial you can use Intel's MKL with > > built-in optimized BLAS and LAPACK and avoid the need for ATLAS. > > > Just to clarify, my understanding is that if you buy a developer's > license, you c

Re: [Numpy-discussion] Efficient operator overloading

2007-04-18 Thread Xavier Gnata
Timothy Hochberg wrote: > > > On 4/18/07, *Sturla Molden* <[EMAIL PROTECTED] > > wrote: > > > On 4/18/2007 7:33 AM, Anne Archibald wrote: > > >copying. And the scope of improvement would be very limited; an > expression like A*B+C*D would be much more efficien

[Numpy-discussion] ANN: SciPy 2007 Conference

2007-04-18 Thread Travis Vaught
Greetings, The *SciPy 2007 Conference* has been scheduled for mid-August at CalTech. http://www.scipy.org/SciPy2007 Here's the rough schedule: Tutorials: August 14-15 (Tuesday and Wednesday) Conference: August 16-17 (Thursday and Friday) Sprints: August 18(Saturday) Exciting thing

Re: [Numpy-discussion] building numpy with atlas on ubuntu edgy

2007-04-18 Thread Andrew Straw
rex wrote: > Keith Goodman <[EMAIL PROTECTED]> [2007-04-18 10:49]: > >> I'd like to compile atlas so that I can take full advantage of my core >> 2 duo. >> > > If your use is entirely non-commercial you can use Intel's MKL with > built-in optimized BLAS and LAPACK and avoid the need for AT

Re: [Numpy-discussion] building numpy with atlas on ubuntu edgy

2007-04-18 Thread Keith Goodman
On 4/18/07, rex <[EMAIL PROTECTED]> wrote: > Keith Goodman <[EMAIL PROTECTED]> [2007-04-18 10:49]: > > I'd like to compile atlas so that I can take full advantage of my core > > 2 duo. > > If your use is entirely non-commercial you can use Intel's MKL with > built-in optimized BLAS and LAPACK and a

Re: [Numpy-discussion] building numpy with atlas on ubuntu edgy

2007-04-18 Thread rex
Keith Goodman <[EMAIL PROTECTED]> [2007-04-18 10:49]: > I'd like to compile atlas so that I can take full advantage of my core > 2 duo. If your use is entirely non-commercial you can use Intel's MKL with built-in optimized BLAS and LAPACK and avoid the need for ATLAS. http://www.intel.com/cd/sof

Re: [Numpy-discussion] Question about Optimization (Inline, and Pyrex)

2007-04-18 Thread Robert Kern
Sebastian Haase wrote: > Does ATLAS/BLAS do anything special for element wise multiplication > and alike - if for example the data is not aligned or not contiguous? Nothing that ATLAS optimizes, no. They focus (rightly) on the more complicated matrix operations (BLAS Level 3, if you are familiar

Re: [Numpy-discussion] building numpy with atlas on ubuntu edgy

2007-04-18 Thread Robert Kern
Charles R Harris wrote: > I don't know which is best, although I suspect the statically linked > version will be larger. It might seem that just pulling in the gemm > routines wouldn't add much, but they pull in lots of supporting > routines. To get numpy to link statically you will also probably

Re: [Numpy-discussion] fumfunction question

2007-04-18 Thread Mark.Miller
Got it...thanks! Travis Oliphant wrote: > Mark.Miller wrote: > >> OK...I think I understand. But just to clarify: >> >> Suppose I have a function that can take 3 parameters >> >> def f(x,y,constant): >>operations >> >> Is it appropriate to use something like >> >> a=numpy.fromfunction(f,(x,y

Re: [Numpy-discussion] fumfunction question

2007-04-18 Thread Travis Oliphant
Mark.Miller wrote: >OK...I think I understand. But just to clarify: > >Suppose I have a function that can take 3 parameters > >def f(x,y,constant): >operations > >Is it appropriate to use something like > >a=numpy.fromfunction(f,(x,y),const) > >where x and y give the array dimensions and cons

Re: [Numpy-discussion] building numpy with atlas on ubuntu edgy

2007-04-18 Thread Charles R Harris
On 4/18/07, Keith Goodman <[EMAIL PROTECTED]> wrote: On 4/18/07, Charles R Harris <[EMAIL PROTECTED]> wrote: > On 4/18/07, Keith Goodman <[EMAIL PROTECTED]> wrote: > > I'd like to compile atlas so that I can take full advantage of my core > > 2 duo. Numpy dynamically links to the debian binary o

Re: [Numpy-discussion] fumfunction question

2007-04-18 Thread Mark.Miller
OK...I think I understand. But just to clarify: Suppose I have a function that can take 3 parameters def f(x,y,constant): operations Is it appropriate to use something like a=numpy.fromfunction(f,(x,y),const) where x and y give the array dimensions and const is another variable that is u

Re: [Numpy-discussion] Efficient operator overloading

2007-04-18 Thread Timothy Hochberg
On 4/18/07, Sturla Molden <[EMAIL PROTECTED]> wrote: On 4/18/2007 7:33 AM, Anne Archibald wrote: >copying. And the scope of improvement would be very limited; an expression like A*B+C*D would be much more efficient, probably, if the whole expression were evaluated at once for each element (due

Re: [Numpy-discussion] Efficient operator overloading

2007-04-18 Thread Matthieu Brucher
This does not mean that all use of operator overloading is inherently bad. Notably, there is a C++ numerical library called Blitz++ which can avoid these tempraries for small fixed-size arrays. As it depends on template metaprogramming, the size must be known at compile time. But if this is the

[Numpy-discussion] Efficient operator overloading

2007-04-18 Thread Sturla Molden
On 4/18/2007 7:33 AM, Anne Archibald wrote: >copying. And the scope of improvement would be very limited; an expression like A*B+C*D would be much more efficient, probably, if the whole expression were evaluated at once for each element (due to memory locality and temporary allocation). But it i

Re: [Numpy-discussion] Question about Optimization (Inline, and Pyrex)

2007-04-18 Thread Sebastian Haase
On 4/18/07, Robert Kern <[EMAIL PROTECTED]> wrote: > Sebastian Haase wrote: > > On 4/17/07, Anne Archibald <[EMAIL PROTECTED]> wrote: > >> On 18/04/07, Robert Kern <[EMAIL PROTECTED]> wrote: > >>> Sebastian Haase wrote: > >>> > Hi, > I don't know much about ATLAS -- would there be other n

Re: [Numpy-discussion] Problems building numpy and scipy on AIX

2007-04-18 Thread Christian Marquardt
Dear David, the svn version of numpy does indeed build cleanly on AIX. Many thanks! However, the wrapper problem still exists for the C++ compiler, and shows up when compiling scipy. Now, I *assume* that SciPy is using the distutils as installed by numpy. Do you know where the linker settings for

Re: [Numpy-discussion] Question about Optimization (Inline, and Pyrex)

2007-04-18 Thread Robert Kern
Sebastian Haase wrote: > On 4/17/07, Anne Archibald <[EMAIL PROTECTED]> wrote: >> On 18/04/07, Robert Kern <[EMAIL PROTECTED]> wrote: >>> Sebastian Haase wrote: >>> Hi, I don't know much about ATLAS -- would there be other numpy functions that *could* or *should* be implemented usi

Re: [Numpy-discussion] building numpy with atlas on ubuntu edgy

2007-04-18 Thread Keith Goodman
On 4/18/07, Charles R Harris <[EMAIL PROTECTED]> wrote: > On 4/18/07, Keith Goodman <[EMAIL PROTECTED]> wrote: > > I'd like to compile atlas so that I can take full advantage of my core > > 2 duo. Numpy dynamically links to the debian binary of atlas-sse that > > I installed. But the atlas website

Re: [Numpy-discussion] building numpy with atlas on ubuntu edgy

2007-04-18 Thread Charles R Harris
On 4/18/07, Keith Goodman <[EMAIL PROTECTED]> wrote: On 4/17/07, David Cournapeau <[EMAIL PROTECTED]> wrote: > Now that you mention it, I am also puzzled by this one: I can see why > you would use atlas3-sse2-dev without atlas3-base-dev (for the static > library), but not having atlas3-base-dev

[Numpy-discussion] Building numpy on Solaris x86 with sun CC and libsunperf

2007-04-18 Thread Peter C. Norton
Hello all, I'm trying to build numpy for some of my users, and I can't seem to get the [blas_opt] or the [lapack_opt] settings to be honored in my site.cfg: $ CFLAGS="-L$STUDIODIR/lib/ -l=sunperf" CPPFLAGS='-DNO_APPEND_FORTRAN' \ /scratch/nortonp/python-2.5.1c1/bin/python setup.py config Running

Re: [Numpy-discussion] Question about Optimization (Inline, and Pyrex)

2007-04-18 Thread Sebastian Haase
On 4/17/07, Anne Archibald <[EMAIL PROTECTED]> wrote: > On 18/04/07, Robert Kern <[EMAIL PROTECTED]> wrote: > > Sebastian Haase wrote: > > > > > Hi, > > > I don't know much about ATLAS -- would there be other numpy functions > > > that *could* or *should* be implemented using ATLAS !? > > > Any ?

Re: [Numpy-discussion] building numpy with atlas on ubuntu edgy

2007-04-18 Thread Keith Goodman
On 4/17/07, David Cournapeau <[EMAIL PROTECTED]> wrote: > Now that you mention it, I am also puzzled by this one: I can see why > you would use atlas3-sse2-dev without atlas3-base-dev (for the static > library), but not having atlas3-base-dev makes it imposible to > dynamically link to atlas librar

Re: [Numpy-discussion] Help using numPy to create a very large multi dimensional array

2007-04-18 Thread Christopher Barker
Bruno Santos wrote: > Finally I was able to read the data, by using the command you sair with > some small changes: > matrix = numpy.array([[float(x) for x in line.split()[1:]] for line in > vecfile]) it doesn't sound like you're concerned about the speed of reading the files, but you can still

Re: [Numpy-discussion] fumfunction question

2007-04-18 Thread Travis Oliphant
Mark.Miller wrote: > Can additional function arguments (aside from the dimensions of an > array) be used in conjunction with fromfunction? > Yes --- as long as they are keyword arguments. Keyword arguments can be passed in and they will be handed over to the function as keyword arguments. -

Re: [Numpy-discussion] Problems building numpy and scipy on AIX

2007-04-18 Thread David M. Cooke
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Christian Marquardt wrote: > Hello, > > I've run into a problem building numpy-1.0.2 on AIX (using gcc and native > Fortran compilers). The problem on that platform in general is that the > process for building shared libraries is different from what'

Re: [Numpy-discussion] Question about Optimization (Inline and Pyrex)

2007-04-18 Thread Lou Pecora
--- Anne Archibald <[EMAIL PROTECTED]> wrote: > I just > took another look at > that code and added a parallel_map I hadn't got > around to writing > before, too. I'd be happy to stick it (and test > file) on the wiki > under some open license or other ("do what thou wilt > shall be the > whole o

[Numpy-discussion] fumfunction question

2007-04-18 Thread Mark.Miller
Can additional function arguments (aside from the dimensions of an array) be used in conjunction with fromfunction? Thanks, -Mark ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Help using numPy to create a very large multi dimensional array

2007-04-18 Thread Timothy Hochberg
On 4/18/07, Bruno Santos <[EMAIL PROTECTED]> wrote: Finally I was able to read the data, by using the command you sair with some small changes: matrix = numpy.array([[float(x) for x in line.split()[1:]] for line in vecfile]) But that doesn't solve my speed problem, now instead of taking 40secon

[Numpy-discussion] Problems building numpy and scipy on AIX

2007-04-18 Thread Christian Marquardt
Hello, I've run into a problem building numpy-1.0.2 on AIX (using gcc and native Fortran compilers). The problem on that platform in general is that the process for building shared libraries is different from what's normally done (and it's a pain...) Anyway. Core python has a dedicated script cal

Re: [Numpy-discussion] Help using numPy to create a very large multi dimensional array

2007-04-18 Thread Bruno Santos
Finally I was able to read the data, by using the command you sair with some small changes: matrix = numpy.array([[float(x) for x in line.split()[1:]] for line in vecfile]) But that doesn't solve my speed problem, now instead of taking 40seconds in the slow step, takes 1min ant 10seconds :( The s

Re: [Numpy-discussion] NumPy benchmark

2007-04-18 Thread lorenzo bolla
the amazing performance of C++ code does not surprise me: a tenfold improvement of the simple Python/Numpy code can be achieved with weave.inline or Pyrex. Hence your benchmarks seems to confirm that "weaved" or "pyrexed" code run as fast as C++ compiled one. Moreover, from your numbers, I can t