Sum of squares between observed and predicted data

    Parameters
    ----------
    obs : iterable
        Observed data
    pred : iterable
        Predicted data

    Returns
    -------
    float
        Sum of squares

    Notes
    -----
    The length of observed and predicted data must match.

def sum_of_squares(obs, pred):
    """
    Sum of squares between observed and predicted data

    Parameters
    ----------
    obs : iterable
        Observed data
    pred : iterable
        Predicted data

    Returns
    -------
    float
        Sum of squares

    Notes
    -----
    The length of observed and predicted data must match.

    """

    return np.sum((np.array(obs) - np.array(pred)) ** 2)