I want to call a c function from python using ctypes. From the documentation I don\'t understand how to pass pointer to vectors. The function I want to call is:
apparently I needed to specify the flag contigous to make it work
http://scipy-lectures.github.io/advanced/interfacing_with_c/interfacing_with_c.html
this is an extract from my code:
array_1d_double = numpy.ctypeslib.ndpointer(dtype=numpy.double, ndim=1,
flags='CONTIGUOUS')
libc.f.argtypes = [c_int, array_1d_double]
libc.f(n, x)