a1 = np.arange(3) + 1.0
a2 = np.zeros(3)
print('before:', '\na1 =', a1, '\na2 =', a2)
lib.test(darray.fromnp(a1), darray.fromnp(a2))
print('after:', '\na1 =', a1, '\na2 =', a2)
Numpy array interface with ctypes function