I have a module that collects stats in an inconsistent time interval. Unfortunately, to use it nicely in a graph, I need the x values interpolated to a consistent interval.
Given the following x, y pairs, what’s the most Pythonic way to do this?
(1, 23), (2, 42), (3.5, 89), (5, 73), (7, 54), (8, 41), (8.5, 37), (9, 23)
Use numpy.interp: