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

Travis Oliphant oliphant at ee.byu.edu
Fri Jan 21 14:43:00 EST 2005


Yichun Wei wrote:

> I turned to arraymap and vectorize after I find the nested loops in 
> python are really too slow for me... Is there another way to speed 
> nested loops?

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.





More information about the SciPy-User mailing list