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

Declare Struct Containing Time_t Field In Python Cffi

I am using CFFI to call a C function from Python that returns a struct. The struct is defined with … Read more Declare Struct Containing Time_t Field In Python Cffi

How Do I Convert A Python List Of Lists Of Lists Into A C Array By Using Ctypes?

As seen here How do I convert a Python list into a C array by using ctypes? this code will take a p… Read more How Do I Convert A Python List Of Lists Of Lists Into A C Array By Using Ctypes?

Installing Bitarray In Python 2.6 On Windows

I would like to install bitarray in Windows running python 2.6. I have mingw32 installed, and I hav… Read more Installing Bitarray In Python 2.6 On Windows

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

Reading Temperature_target Directly From Cpu

I would like to directly read the minimum temperate at which the TCC will be activated from the TEM… Read more Reading Temperature_target Directly From Cpu

Finding Out Same Colored Block In A 2d Matrix

I am trying to find out a block of same colored region starting from the top left corner in a 2D ma… Read more Finding Out Same Colored Block In A 2d Matrix

How To Pass A 2d Array From Python To C?

I'm trying to pass a 2d array from Python to C, using ctypes. The array dtype is uint16. I wrot… Read more How To Pass A 2d Array From Python To C?

Writing Cython Extension: How To Access A C Struct Internal Data From Python?

Disclaimer: I took the following example from the Python Cookbook (O'Reilly). Let's say I h… Read more Writing Cython Extension: How To Access A C Struct Internal Data From Python?