It looks like "NUMPY_INTERFACE" was not defined in your build. That is the reason for the error in your first post also. "matrix.h" includes "arrayobject.h" which includes "ndarraytypes.h".
gcc has a command line switch:
-D name "Predefine name as a macro, with definition 1"
Thanks, #define NUMPY_INTERFACE solved the problem! Sorry about delayed response.
I have a different issue now. I followed all the instructions from this guide: http://www.asiteof.me/archives/50 and I still get these errors on compile:
1> Creating library .\Win32\Debug\pyconvnet.lib and object .\Win32\Debug\pyconvnet.exp 1>convnet.cu.obj : error LNK2019: unresolved external symbol cublasInit@0 referenced in function "protected: void thiscall ConvNet?::initCuda(void)" (?initCuda@ConvNet?@@IAEXXZ)
1>layer.cu.obj : error LNK2019: unresolved external symbol PyDict_GetItemString? referenced in function "public: thiscall NeuronLayer?::NeuronLayer?(class ConvNet? ,struct object )" (??0NeuronLayer@@QAE@PAVConvNet@@PAU_object@@@Z)