I wrote some Python code and it worked fine when using the "python". I then converted it to C using "Cython" and used distutils to compile it to a shared library. I then changed some of the code to Cython so it would run faster. But when I imported the .so module and tried to use the command I had "cdef"ed it said that the command didn't exist. Original code:
import time as t
def time(function):
t1 = t.time()
function()
t2 = t.time()
return t2 - t1
New code:
import time as t
cdef time(function):
t1 = t.time()
function()
t2 = t.time()
return t2 - t1
I tried using "cdef int time" but I got the same result. Any advice?