def _log_normalize(X):
    X = make_nonnegative(X, min_value=1)
    if issparse(X):
        raise ValueError("Cannot compute log of a sparse matrix,"
                         " because log(x) diverges to -infinity as x"
                         " goes to 0.")
    L = np.log(X)
    row_avg = L.mean(axis=1)[:, np.newaxis]
    col_avg = L.mean(axis=0)
    avg = L.mean()
    return L - row_avg - col_avg + avg
Normalize ``X`` according to Kluger's log-interactions scheme.
dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/cluster/bicluster.py/_log_normalize