You can create your own functions with numpy. For derivatives using forward differences (edit thanks to @EOL, but note that NumPy diff() not a differentiable function ):
def diff_fwd(x, y): return np.diff(y)/np.diff(x)
βcentralβ differences (this is not necessarily central, depending on the distance between the data):
def diff_central(x, y): x0 = x[:-2] x1 = x[1:-1] x2 = x[2:] y0 = y[:-2] y1 = y[1:-1] y2 = y[2:] f = (x2 - x1)/(x2 - x0) return (1-f)*(y2 - y1)/(x2 - x1) + f*(y1 - y0)/(x1 - x0)
where y contains function scores and x corresponding "times", so you can use an arbitrary interval.
source share