Feb 10, 2012

timeit example

An example of how to time a statement

>>> import numpy as np
>>> arr1 = np.random.randint(0,1600,(3000,3000))
>>> timeit arr1.argmin()
10 loops, best of 3: 34.2 ms per loop

Tested under Mac Lion Os proc i7 and Python 2.7.1 r271:86832

No comments: