def mean(x, old_mean, old_num_samples):
    """
    Incremental update (using unbiased formula) of sample mean.

    Parameters
    ----------
    x : numpy.ndarray, shape=(1, n)
        New point.

    old_mean : numpy.ndarray, shape=(1, n)
        Old sample mean.

    old_num_samples : int
        Old number of samples.

    Returns
    -------
    new_mean : numpy.ndarray, shape=(1, n)
        Updated sample mean.

    References
    ----------
    Lughofer, Edwin. Evolving fuzzy systems-methodologies, advanced concepts
    and applications. Vol. 53. Berlin: Springer, 2011.

    """
    new_num_samples = old_num_samples + 1

    new_mean = (old_num_samples / new_num_samples) * old_mean + \
               ((1 / new_num_samples) * x)

    return new_mean