Re: [Numpy-discussion] Fromfunction generalization

2008-04-22 Thread Gnata Xavier
,j:f(i,j,7),(1000,1000)) > > L. > > On Tue, Apr 22, 2008 at 8:42 PM, Gnata Xavier <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > Hi, > > fromfunction is fine but I have like to be able to create 2Darrays > using > a function of

[Numpy-discussion] Fromfunction generalization

2008-04-22 Thread Gnata Xavier
Hi, fromfunction is fine but I have like to be able to create 2Darrays using a function of i,j but also of one (or more) parameters. Something like that : def f(i,j,a): return (i+j)*a #replace that by another non trivial computation M=fromfunction(f( hum well something like i,j,a),(1000,100

Re: [Numpy-discussion] Openmp support (was numpy's future (1.1 and beyond): which direction(s) ?)

2008-03-24 Thread Gnata Xavier
Robert Kern wrote: > On Mon, Mar 24, 2008 at 12:12 PM, Gnata Xavier <[EMAIL PROTECTED]> wrote: > > >> Well it is not that easy. We have several numpy code following like this : >> 1) open an large data file to get a numpy array >> 2) perform computations o

Re: [Numpy-discussion] Openmp support (was numpy's future (1.1 and beyond): which direction(s) ?)

2008-03-24 Thread Gnata Xavier
Matthieu Brucher wrote: > > It is a real problem in some communities like astronomers and images > processing people but the lack of documentation is the first one, > that > is true. > > > Even in those communities, I think that a lot could be done at a > higher level, as what IPy

Re: [Numpy-discussion] Openmp support (was numpy's future (1.1 and beyond): which direction(s) ?)

2008-03-24 Thread Gnata Xavier
> A couple of thoughts on parallelism: > > 1. Can someone come up with a small set of cases and time them on > numpy, IDL, Matlab, and C, using various parallel schemes, for each of > a representative set of architectures? We're comparing a benchmark to > itself on different architectures, rather

Re: [Numpy-discussion] Openmp support (was numpy's future (1.1 and beyond): which direction(s) ?)

2008-03-24 Thread Gnata Xavier
David Cournapeau wrote: > Gnata Xavier wrote: > >> Ok I will try to see what I can do but it is sure that we do need the >> plug-in system first (read "before the threads in the numpy release"). >> During the devel of 1.1, I will try to find some time to unde

Re: [Numpy-discussion] Openmp support (was numpy's future (1.1 and beyond): which direction(s) ?)

2008-03-23 Thread Gnata Xavier
David Cournapeau wrote: > Gnata Xavier wrote: > >> Well of course my goal was not to say that my simple testcase can be >> copied/pasted into numpy :) >> Of ourse it is one of the best case to use openmp. >> Of course pragma can be more complex than that (you c

Re: [Numpy-discussion] Openmp support (was numpy's future (1.1 and beyond): which direction(s) ?)

2008-03-23 Thread Gnata Xavier
David Cournapeau wrote: > Francesc Altet wrote: > >> Why not? IMHO, complex operations requiring a great deal of operations >> per word, like trigonometric, exponential, etc..., are the best >> candidates to take advantage of several cores or even SSE instructions >> (not sure whether SSE su

Re: [Numpy-discussion] Openmp support (was numpy's future (1.1 and beyond): which direction(s) ?)

2008-03-23 Thread Gnata Xavier
Travis E. Oliphant wrote: > Anne Archibald wrote: > >> On 22/03/2008, Travis E. Oliphant <[EMAIL PROTECTED]> wrote: >> >> >>> James Philbin wrote: >>> > Personally, I think that the time would be better spent optimizing >>> > routines for single-threaded code and relying on BLAS and LA

Re: [Numpy-discussion] numpy's future (1.1 and beyond): which direction(s) ?

2008-03-21 Thread Gnata Xavier
David Cournapeau wrote: > Hi, > > numpy 1.0.5 is on the way, and I was wondering about numpy's future. I > myself have some ideas about what could be done; has there been any > discussion behind what is on 1.1 trac's roadmap ? Some of the things I > would like to see myself: > - a frame

Re: [Numpy-discussion] Numpy and OpenMP

2008-03-17 Thread Gnata Xavier
Charles R Harris wrote: > > > On Mon, Mar 17, 2008 at 1:59 PM, Gnata Xavier <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > Francesc Altet wrote: > > A Monday 17 March 2008, Christopher Barker escrigué: > > > >>>

Re: [Numpy-discussion] Numpy and OpenMP

2008-03-17 Thread Gnata Xavier
Francesc Altet wrote: > A Monday 17 March 2008, Christopher Barker escrigué: > >>> > Plus a certain amount of numpy code depends on order of >>> > evaluation: >>> > >>> > a[:-1] = 2*a[1:] >>> >> I'm confused here. My understanding of how it now works is that the >> above translates to

Re: [Numpy-discussion] Numpy and OpenMP

2008-03-15 Thread Gnata Xavier
Scott Ransom wrote: > On Sat, Mar 15, 2008 at 07:33:51PM -0400, Anne Archibald wrote: > >> ... >> To answer the OP's question, there is a relatively small number of C >> inner loops that could be marked up with OpenMP #pragmas to cover most >> matrix operations. Matrix linear algebra is a separa

Re: [Numpy-discussion] Numpy and OpenMP

2008-03-15 Thread Gnata Xavier
Robert Kern wrote: On Sat, Mar 15, 2008 at 2:48 PM, Gnata Xavier <[EMAIL PROTECTED]> wrote: Hi, Numpy is great : I can see several IDL/matlab projects switching to numpy :) However, it would be s nice to be able to put some OpenMP into the numpy code. It would be nice to be a

[Numpy-discussion] Numpy and OpenMP

2008-03-15 Thread Gnata Xavier
Hi, Numpy is great : I can see several IDL/matlab projects switching to numpy :) However, it would be s nice to be able to put some OpenMP into the numpy code. It would be nice to be able to be able to use several CPU using the numpy syntax ie A=sqrt(B). Ok, we can use some inline C/C++ co