import numpy as np
A = np.array([[3.0, 1.0, 2.0, 0.0], [2.0, 1.0, 3.0, 1.0], [0.0, 2.0, 0.0, 
    3.0]], dtype='float64', order='F')
for row in A.transpose():
    lib.DoSomething(np.ctypeslib.as_ctypes(row))
Fast iteration over columns of a matrix with ctypes