Summary of the debugging examples

Check that import_array() is called if the NumPy C API is in use!
ImportError suggests wrong module initialization or missing required/user functions
You need experience to track down errors in the C code
An error in one place often shows up as an error in another place (especially indexing out of bounds or wrong memory handling)
Use a debugger (gdb) and print statements in the C code and the calling script
C++ modules are (almost) as error-prone as C modules

previousnexttable of contents