def compute_error(res_1, res_2):
    """
    Compute the error between two set of data.

    Parameters
    ----------
    res_1 : numpy array or pandas DataFrame
        The reference results.
    res_2 : numpy array or pandas DataFrame
        The new results.

    Returns
    -------
    abs_err : numpy array or pandas DataFrame
        The absolute error between the results.
    rel_err : numpy array or pandas DataFrame
        The relative error between the results.

    """
    abs_err = res_2 - res_1
    rel_err = res_2 / res_1 - 1.0
    return abs_err, rel_err
