def normalize_mean(array, array_mean, array_stddev, cols=[]):
    """
    Normalizes columns of the array with mean normalization.

    Parameters
    ----------
    array : numpy.array
        The array to normalize.
    array_mean : numpy.array
        Array containing mean values of each column.
    array_stddev : numpy.array
        Array containing standard deviation values of each column.
    cols : list
        The columns to normalize. If the list is empty (default),
        all columns will be normalized.


    Returns
    -------
    numpy.array
        The normalized array.

    Note
    ----
    You can use :py:func:`~get_meanstd` function to get :code:`array_mean`
    and :code:`array_stddev` parameters.
    """
    normalized_array = array.astype(float)
    all_normalized = (array - array_mean) / array_stddev
    if len(cols) == 0:
        normalized_array = all_normalized
    elif array.ndim == 1:
        normalized_array[cols] = all_normalized[cols]
    else:
        normalized_array[:, (cols)] = all_normalized[:, (cols)]
    return normalized_array
