In [1]:
pwd
Out[1]:
In [2]:
import mysqrt
In [3]:
mysqrt.test()
In [4]:
run mysqrt.py
In [5]:
mysqrt.__name__
Out[5]:
In [6]:
time sqrt(2.)
Out[6]:
In [7]:
timeit sqrt(2.)
us means micro-seconds, 1e-6 second
In [9]:
timeit mysqrt.sqrt2(2.)
In [10]:
timeit y = sqrt(linspace(0,1,1000))
In [11]:
%%timeit
y = zeros(1000)
for i in range(1000):
y[i] = sqrt(i)
ms = millisecond = 1e-3 second = 1000 micro seconds
In [ ]: