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

Python C-api And Unicode Strings

I need to convert between python objects and c strings of various encodings. Going from a c string … Read more Python C-api And Unicode Strings

Implementing Nb_inplace_add Results In Returning A Read-only Buffer Object

I'm writing an implementation of the in-place add operation. But, for some reason, I sometimes … Read more Implementing Nb_inplace_add Results In Returning A Read-only Buffer Object

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

How To Use Setuptools Packages And Ext_modules With The Same Name?

I got the following file structure for my Python C Extension project: . ├── setup.py ├── source   … Read more How To Use Setuptools Packages And Ext_modules With The Same Name?

Pyobject Segfault On Function Call

I'm trying to use Python to open a dialog to accept input into my C++ application. Here is a v… Read more Pyobject Segfault On Function Call

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?