Ok, I think I am missing something - I am a bit lost in the Cython jargon.
Here is where I stand, let me know where I am going wrong...   I compiled
with cython.py -a test.py, but it isn't working.  If I am completely not on
the right track, feel free to let me know :)

Ian

##### test.py (Pure python file) #####
from math import sin

def f(r):
    s=sin(r)
    return s

r=3.141592654/3.0
print f(r)

#### test.pxd #####
cimport cython
import cython

cimport math_override

@cython.locals(s=cython.
double)
cpdef f(double r)

#### math_override.pxd #####
cdef extern from "math.h":
    double sin_d "sin" (double x)
    float sin_f "sin" (float x)

cpdef inline double sin(double x):
    return sin_d(x)

cpdef inline float sin(float x):
    return sin_f(x)
_______________________________________________
cython-devel mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cython-devel

Reply via email to