[SciPy-user] Re: vectorize(function)/arraymap did not return arrays?

Yichun Wei yichunwe at usc.edu
Sat Jan 29 18:59:29 EST 2005


Hi Travis,

I just read this message. I am reading weave document but feel hard to 
figure out how to make Python call in the weave.inline expr strings. 
Coudl you give a simple example or point me to an example?

If I implement all of this algorithm in weave using weave.inline, I 
think I have to implement the array summation, multiplying, reshaping 
operations in C..., which scipy does them quite well. I think I will try 
to write the loops in weave first, with a python call in the inner loop.

Travis Oliphant Wrote:
 > Use weave or f2py to write the loop -- of course if the inner portion
 > of the loop is a Python call this may not speed things up too much.
 > Another thing to do is to re-write the algorithm using a different
 > approach.
 >
 > Python has pretty fast loops compared to other interpreted languages
 > but it can still cause slow downs.

Thanks in advance!

- yichun




More information about the SciPy-User mailing list