[Numpy-discussion] numpy speed question

Jean-Luc Menut jeanluc.menut@free...
Thu Nov 25 04:55:24 CST 2010


Le 25/11/2010 11:51, Ernest Adrogué a écrit :
> I'm not an expert either, but the basic idea you have to get is
> that "for" loops in Python are slow. Numpy is not going to change
> this. Instead, Numpy allows you to work with "vectors" and "arrays"
> so that you need not putting loops in your code. So, you have to
> change the way you think about things, it takes a little to get
> used to it at first.

Yes I know but IDL share this characteristics with numpy, and sometimes 
you cannot avoid loop. Anyway it was just a test to compare the speed of 
the cosine function in IDL and numpy.



More information about the NumPy-Discussion mailing list