I would like to make an interpolation of two arrays between two times and make a projection for a future time.
Let's say to have information and time0 = 0, time3=3. I would like to have information for time1=1, time=2 and time=4, time=5.
import numpy as np
time0, data0 = 0, np.array([[0,0,0],[1,1,1],[2,2,2]], dtype=np.float64)
time3, data3 = 3, np.array([[3,3,3],[0,5,0],[-2,0,2]], dtype=np.float64)
tInterp = np.array([1, 2])
aDiff1D = np.reshape(data3 - data0, (1, np.size(data0)))
aDiffRepeated = np.repeat(aDiff1D, np.size(tInterp), axis=0)
aStep = aDiffRepeated * ((tInterp[:, None] - time0) / (time3 - time0))
aInterp = np.repeat(np.reshape(data0, (1, np.size(data0))), np.size(tInterp), axis = 0) + aStep
aInterp = np.reshape(aInterp, (np.size(tInterp), data0.shape[0], data0.shape[1]))
data1 = aInterp[0]
data2 = aInterp[1]
How can I extrapolate information and make projection in order to have data4 and data5 corresponding time time=4 and time=5