I am trying to convert a MATLAB code to Python where I am stuck of how to import this line to Python:
YDFA_xa_p = interp1(data(:,1),data(:,2),YDFA_lam_p*1e9,'linear')*1e-24;
Now for Python I have changed it as:
YDFA_xa_p = numpy.interp(data[:, 1], data[:, 2], YDFA_lam_p * 1e9) * 1e-24
data[:,1] and data[:,2] and YDFA_lam_p values are:
[ 2. 2. 2. 2. 2. 2. 2. 2. 2. 2.] [ 3. 3. 3. 3. 3. 3. 3. 3. 3. 3.] 915.0
The issue I see is that the variable YDFA_lam_p is a float variable while it is expecting an array of float of 10 elements?
If I am correct in my understanding how can I correct it ? I tried ways I find in google but it just isn't working.