for i in range(5):
    outdata[i] = (ctypes.c_double * 6)()
for j in range(6):
    outdata[i][j] = 1.0
lib = ctypes.cdll.LoadLibrary('test')
fun = lib.cfun

def dump(a, rows, cols):
    for i in range(rows):
        for j in range(cols):
            print(a[i][j], end=' ')
print() 
dump(indata, 5, 6)
fun(ctypes.byref(indata), 5, 6, ctypes.byref(outdata))
dump(outdata, 5, 6)
передача двойного указателя С++ на python