def weighted_mean(values, weights):
    """Calculate the weighted mean.

    :param values: Array of values
    :type values: numpy.ndarray
    :param weights: Array of weights
    :type weights: numpy.ndarray
    :rtype: float
    """
    weighted_mean = (values * weights).sum() / weights.sum()

    return weighted_mean