Skip to content Skip to sidebar Skip to footer
Showing posts with the label Python C Api

How To Create A Custom Python Exception Type In C Extension?

I'm writing a Python module in C. I need to report errors that can't be described by built-… Read more How To Create A Custom Python Exception Type In C Extension?

Pointer-type Mismatch With Pyarray_simplenew

I am creating a module for Python with Numpy using the C API and encounter weird incompatibilities … Read more Pointer-type Mismatch With Pyarray_simplenew

Std::bad_alloc After Replacing Boost:python Function Wrapper With Python/c Api

I had a function in C which I used to extend python, previously using the BOOST_MODULE function to … Read more Std::bad_alloc After Replacing Boost:python Function Wrapper With Python/c Api

Numpy/capi Error With Import_array() When Compiling Multiple Modules

I am trying to compile a C++ module to use in scipy.weave that is composed of several headers and s… Read more Numpy/capi Error With Import_array() When Compiling Multiple Modules

Pyobject_callmethod With Keyword Arguments

I'm trying to embed a Python (2.7) library in my C application and I'm using the Python/C A… Read more Pyobject_callmethod With Keyword Arguments

Is It Possible To Cast Dtype Of Scipy Csr Matrix To Npy_float?

I have a scipy CSR matrix that was constructed from a COO matrix as follows: coord_mat = coo_matrix… Read more Is It Possible To Cast Dtype Of Scipy Csr Matrix To Npy_float?

Unhandled Exception At Multiarray.pyd The 2nd Time The Program Runs

I'm making a .dll plug-in in c++ and embedding python 2.7 in it. Everything worked fine with si… Read more Unhandled Exception At Multiarray.pyd The 2nd Time The Program Runs

Pyarg_parsetuple Segfaults In Capi

I am writing a code, trying to get used to the C API of NumPy arrays. #include #include 'nump… Read more Pyarg_parsetuple Segfaults In Capi