Re: [Numpy-discussion] optimising single value functions for array calculations

2008-12-01 Thread Stéfan van der Walt
2008/12/1 Nadav Horesh <[EMAIL PROTECTED]>: > I does not solve the slowness problem. I think I read on the list about an > experimental code for fast vectorization. The choices are basically weave, fast_vectorize (http://projects.scipy.org/scipy/scipy/ticket/727), ctypes, cython or f2py. Any I le

Re: [Numpy-discussion] optimising single value functions for array calculations

2008-12-01 Thread Nadav Horesh
] optimising single value functions for array calculations Hello Timmie, numpy.vectorize(myfunc) should do what you want. Cheers, Emmanuelle > Hello, > I am developing a module which bases its calculations > on another specialised module. > My module uses numpy arrays a lot. > The prob

Re: [Numpy-discussion] optimising single value functions for array calculations

2008-12-01 Thread Matthieu Brucher
2008/12/1 Timmie <[EMAIL PROTECTED]>: > Hello, > I am developing a module which bases its calculations > on another specialised module. > My module uses numpy arrays a lot. > The problem is that the other module I am building > upon, does not work with (whole) arrays but with > single values. > The

Re: [Numpy-discussion] optimising single value functions for array calculations

2008-12-01 Thread Emmanuelle Gouillart
Hello Timmie, numpy.vectorize(myfunc) should do what you want. Cheers, Emmanuelle > Hello, > I am developing a module which bases its calculations > on another specialised module. > My module uses numpy arrays a lot. > The problem is that the other module I am building > upon, does not work wit

[Numpy-discussion] optimising single value functions for array calculations

2008-12-01 Thread Timmie
Hello, I am developing a module which bases its calculations on another specialised module. My module uses numpy arrays a lot. The problem is that the other module I am building upon, does not work with (whole) arrays but with single values. Therefore, I am currently forces to loop over the array: