I have a C-function which takes 2 dynamic arrays for input and output data.
int MyFunction(float *in, float *out)
I tried to allocate the space for my input and output data using
calloc_float(nb_elements) from cmalloc.i and formated my input data in a
Python string using struct.pack.
However, when I want to use memmove() to transfer my binary data
contained in the Python string to the allocated space, I get a
TypeError: in method 'memmove', argument 2 of type 'void const *'.
What am I doing wrong ? Is there another possibility ? Perhaps, the use
of FloatArray object from carray.i, but I find that looping through the
whole array in order to fill every single element would be less elegant.
Ghislain Vaillant, PhD student
Department of Imaging Sciences
King's College London
The Rayne Institute
St Thomas' Hospital
Lambeth Wing (4th floor)
SE1 7EH London
Tel: +44 (0)20 718 85441
Fax: +44 (0)20 718 85442
Get latest updates about Open Source Projects, Conferences and News.