Reputation: 135
What I want is to extend an array of length m to an array of length n (n>m)
, and interpolate the missing values linearly.
For example, I want to extend this array [1,5,1,7]
to an array of length 7
, the result should be [1,3,5,3,1,5,7], where the bold figures result from linear interpolation.
Is there an easy way to do this in Python? Thanks in advance.
Upvotes: 3
Views: 3367