I'm trying to import my own made C dll to python code. The function in the dll accepts 10x1 vector of float, return 1 float as result. This is MWE how I try to use it:
from ctypes import*
import numpy as np
mydll = cdll.LoadLibrary(".\Test.dll")
input=[18.1000, 1.1000, 0.2222, 0.2115, 0.0663, 0.5000, 352.0000, 0, 0, 42.0000]
input=np.transpose(input)
result=mydll.Test(input)
This fails with following error:
----> 7 result=mydll.Test(input)
ArgumentError: argument 1: <class 'TypeError'>: Don't know how to convert parameter 1
Can you help me figuring it out? My first idea was that maybe input data does not match but it doesn't matter if I transpose or not, the error is the same.