Writing cython and interfacing to numpy: here
Making C functions in a library callable from python: here