I have a question about passing arrays created in python to C via the SWIG interface.
In C I have a function that looks like this:
void set_arrayt(int *noElements, void *myArray)
Now i would like to create a numpy-array in python and call this function.
Thanks to the cpointer functions of swig i am able to create a int_pointer that i can use for the noElements parameter:
noElements = mymodule.new_intp()
However, i dont have an idea how to "convert" a numpy array like
myArray = np.ones((10,10))
to a void pointer so that I can pass it as a parameter to the set_array function.
I hope you can help me and thank you in advance!
Get latest updates about Open Source Projects, Conferences and News.