[Numpy-discussion] numpy speed question

Alan G Isaac alan.isaac@gmail....
Thu Nov 25 08:00:57 CST 2010

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'>

Alan Isaac

More information about the NumPy-Discussion mailing list