def forward_difference(arr,h=1,order=1):
    """Returns the forward differences of an array.
    h = increment
    order = number of times to apply forward differnce operator
    """
    diffs = arr
    for _ in range(order):
        diffs = [diffs[i+h] - diffs[i] for i in range(len(diffs)-h)]
    return diffs