I solved my problem. I had the math.h import step in the wrong location. The import step needed to be outside of the function -- I'm so embarrassed.
Code: [Download] 1. 2. # 3. # Use C math functions 4. # 5. 6. # Import the native C functions we need 7. cdef extern from "math.h": 8. double cos(double theta) 9. double sin(double theta) 10. 11. 12. def cTest(double theta): 13. 14. cdef double result[2] 15. 16. import sys 17. 18. result[0] = cos(theta) 19. result[1] = sin(theta) 20. 21. pyResult = (result[0], result[1]) 22. 23. return pyResult 24. 25. Now it works If I type the following into the python shell import cTest cTest.cTest(.775) The function returns (0.71442103405593138, 0.69971607534660352) -- http://mail.python.org/mailman/listinfo/python-list