Given some data of shape 20×45, where each row is a separate data set, say 20 different sine curves with 45 data points each, how would I go about getting the same data, but with shape 20×100?
In other words, I have some data A of shape 20×45, and some data B of length 20×100, and I would like to have A be of shape 20×100 so I can compare them better.
This is for Python and Numpy/Scipy.
I assume it can be done with splines, so I am looking for a simple example, maybe just 2×10 to 2×20 or something, where each row is just a line, to demonstrate the solution.
Thanks!
Ubuntu beat me to it while I was typing this example, but his example just uses linear interpolation, which can be more easily done with numpy.interpolate… (The difference is only a keyword argument in scipy.interpolate.interp1d, however).
I figured I’d include my example, as it shows using scipy.interpolate.interp1d with a cubic spline…