def absolute_error(y, y_pred):
    """Calculates the sum of the differences
    between target and prediction.
    
    Parameters:
    -----------
    y : vector, shape (n_samples,)
    The target values.

    y_pred : vector, shape (n_samples,)
    The predicted values.
    
    Returns:
    --------
    error : float number, sum of the differences
    between target and prediction
    
    """

    y, y_pred = convert_assert(y, y_pred)
    return np.sum(y - y_pred)