On 11/25/2010 5:55 AM, Jean-Luc Menut wrote: > it was just a test to compare the speed of > the cosine function in IDL and numpy
The point others are trying to make is that you *instead* tested the speed of creation of a certain object type. To test the *function* speeds, feed both large arrays. >>> type(0.5) <type 'float'> >>> type(math.cos(0.5)) <type 'float'> >>> type(np.cos(0.5)) <type 'numpy.float64'> hth, Alan Isaac _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion