Skip to content

Commit

Permalink
exercise
Browse files Browse the repository at this point in the history
  • Loading branch information
lrmor committed Dec 3, 2020
1 parent b7293d8 commit af6d948
Show file tree
Hide file tree
Showing 73 changed files with 34,008 additions and 60 deletions.
Binary file added cython/c-functions/__pycache__/fib.cpython-36.pyc
Binary file not shown.
Binary file not shown.
2,679 changes: 2,679 additions & 0 deletions cython/c-functions/fib_cyt.c

Large diffs are not rendered by default.

Binary file not shown.
5 changes: 5 additions & 0 deletions cython/c-functions/fib_cyt.pyx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

cpdef fibonacci(int n):
if n < 2:
return n
return fibonacci(n-2) + fibonacci(n-1)
8 changes: 8 additions & 0 deletions cython/c-functions/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from distutils.core import setup, Extension
from Cython.Build import cythonize
import numpy

setup(
ext_modules=cythonize("fib_cyt.pyx",compiler_directives = {'language_level': 3}),include_dirs = [numpy.get_include()],
)

Binary file not shown.
Binary file not shown.
Loading

0 comments on commit af6d948

Please sign in to comment.