def delta(vectors):
    """ Computes the finite difference on an arralike.

    Parameters
    ----------
    vectors : ndarray
        An array of vectors or scalars.
        
    Returns
    -------
    ndarray
        An array of vectors or scalars of shape (n-1,...),
        when vectors input have shape (n,...).
    
    Examples
    --------
    >>> from pyfac.utils import *  # doctest: +SKIP
    >>> delta(np.arange(5))
    array([1, 1, 1, 1])
    >>> delta(np.array([4, 3, 7, 4, 2, 92]))
    array([-1,  4, -3, -2, 90])
    >>> delta(np.array([[1, 0, 0], [0, 1, 3], [7, -13, 4]]))
    array([[ -1,   1,   3],
           [  7, -14,   1]])
    """
    return vectors[1:] - vectors[:-1]
