I have a c++ implementation wrapped with SWIG and compiled to a module which can be used by python.
I am using ctypes to call the function with ctype arguments, int double etc. The output of my_function(ctype args) is an int**, i.e. it's a multidimensional array.
How can I cast this into a 2D numpy array inside the python script? I have been looking at ctypes pointers but so far I have had no luck. I have spent many, many hours reading the C-API of python and numpy for use with SWIG, and implementing on the c++ side to return a numpy array has so far been incredibly hard and completely unsuccessful.