Resampling an irregular distributed 1-D signal in python
Following Warren Weckesser's comment, the answer is using scipy.interpolate.interp1d
I've a nx2 ndarray which represent a height profile of the form h(x), with x being a non-negative real number and h(x) the height value in x. The x-values are irregular distributed, meaning:
x[i] - x[i - 1] != x[i + 1] - x[i]
I would like to take my array and create a new one with evenly spaced x-values with the corresponding heights. The distance between the x-values can be any positive number. Is there an efficient way to do something like this using numpy?