def spline_diff(t, y, k=3, n=1):
    """
    Wrapper for InterpolatedUnivariateSpline derivative function
    """
    from numpy import sum
    from scipy.interpolate import InterpolatedUnivariateSpline as spline
    ans = spline(t, y.real, k=k).derivative(n=n)(t) + (1.0j * spline(t, y.
        imag, k=k).derivative(n=n)(t) if sum(abs(y.imag)) != 0 else 0)
    return ans
