def col_normalization(data):
    """
    Perform z-normalization on all columns
    """
    data_mu = data.mean(axis=0, keepdims=True)
    data_sigma = data.std(axis=0, keepdims=True)
    data_sigma[data_sigma == 0] = 1.0
    return (data - data_mu) / data_sigma
