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

F2py Linking Quadmath Libraries? Use Ctypes For Fortran Wrapper Instead?

Update 11/23/2019: This started out as a question about why I could not get f2py to work for a simp… Read more F2py Linking Quadmath Libraries? Use Ctypes For Fortran Wrapper Instead?

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

Memory Leak When Embedding Python Into My Application

The following program, when linked against python 2.7.13 and run on Windows 10 slowly but steadily … Read more Memory Leak When Embedding Python Into My Application

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?

Python C Api Crashes On 'import Numpy' When Initilizing Multiple Times

While working with the Python C API, I found that the python interpreter crashes when initializing … Read more Python C Api Crashes On 'import Numpy' When Initilizing Multiple Times

SegFault When Trying To Write To A Numpy Array Created Within A C Extension

I have an if clause within a for loop in which I have defined state_out beforehand with: state_out … Read more SegFault When Trying To Write To A Numpy Array Created Within A C Extension

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