Home » » cython function in ipython

cython function in ipython

cython function in ipython

%load_ext cythonmagic

In [4]: %%cython
   ...: def fib(int n):
   ...:         cdef int a,b,i
   ...:         a,b=1,1
   ...:         for i in range(n):
   ...:                 a, b = a+b, a
   ...:         return a
   ...:

Just a simple rewrite, the cython function is 100X faster than the python one. 

5 Comments:

sri said...

Thanks for sharing this informative content.,
Leanpitch provides online training in Scrum Master Certification, everyone can use it wisely.
Join Leanpitch 2 Days CSM Certification Workshop in different cities.

CSM online training

CSM training online

sri said...


Thanks for sharing this informative content.,
Leanpitch provides online training in Scrum Master Certification, everyone can use it wisely.
Join Leanpitch 2 Days CSM Certification Workshop in different cities.
CSM training online

Scrum master training online

sri said...


Thanks for sharing this.,
Leanpitch provides online training in Scrum Master, everyone can use it wisely.
Join Leanpitch 2 Days CSM Certification Workshop in different cities.

Scrum master certification

csm certification

Dissertation Assistance Services said...

Many students require dissertation aid services. This is because they are unable to cope with the pressure and workload necessary to complete their dissertations. However, many students are able to cope with the stress and effort by using the cython function in ipython.

Leather Jacket for men said...

Leatheriza is offering a wide variety of handcrafted leather jackets online for men as well as leather jackets for women also we have handmade leather shoes for men with other leather products such as leather messenger bags.

Popular Posts