You can simply iterate over your C array and copy the values to the
numpy array :
myarray = np.empty(num_elements)
for i in range(num_elements):
myarray[i] = pfArray[i]
What about numpy.frombuffer()? I've used that function successfully with a ctypes array.
import numpy as np
import ctypes
buffer = (ctypes.c_float * 100)
# do something with buffer
a = np.frombuffer(buffer, np.float32)
That will set up an array pointing to the SAME memory. You then need to
.copy() it if you don't want that; otherwise you need to make sure the
memory is freed when the array is freed, which is done through creating
a cdef class (again, there's examples in the mailing list archives
somewhere...)
Dag Sverre