def derivative(x, y, dx=1, order=3, k=1):
    """
    Find the 1-st derivative of a spline at a point.

    Given a function, use a central difference formula with spacing `dx` to
    compute the `n`-th derivative at `x0`.

    :param x:
    :param y:
    :param dx:
    :param order:
    :param k:
    :return:
    """
    import scipy.misc as sci_misc
    import scipy.interpolate as sci_itp
    func = sci_itp.InterpolatedUnivariateSpline(x, y, k=k)
    return sci_misc.derivative(func, x, dx=dx, order=order)
