(x, beta)
return stdev / betabar
r"""Compute row sum standard deviation.

    Compute for approximation x, the std dev of the row sums
    s(x) = ( 1/n \sum_k  (x_k beta_k - betabar)^2 )^(1/2)
    with betabar = 1/n dot(beta,x)

    Parameters
    ----------
    x : array
    beta : array

    Returns
    -------
    s(x)/betabar : float

    Notes
    -----
    equation (7) in Livne/Golub
r"""Compute row sum standard deviation.
r Compute row sum standard deviation .
def rowsum_stdev(x, beta):
    r"""Compute row sum standard deviation.

    Compute for approximation x, the std dev of the row sums
    s(x) = ( 1/n \sum_k  (x_k beta_k - betabar)^2 )^(1/2)
    with betabar = 1/n dot(beta,x)

    Parameters
    ----------
    x : array
    beta : array

    Returns
    -------
    s(x)/betabar : float

    Notes
    -----
    equation (7) in Livne/Golub

    """
    n = x.size
    betabar = (1.0 / n) * np.dot(x, beta)
    stdev = np.sqrt((1.0 / n) * np.sum(np.power(np.multiply(x, beta) - betabar, 2)))
    return stdev / betabar
def rowsum_stdev ( x , beta ) : n = x . size betabar = ( 1.0 / n ) * np . dot ( x , beta ) stdev = np . sqrt ( ( 1.0 / n ) * np . sum ( np . power ( np . multiply ( x , beta ) - betabar , 2 ) ) ) return stdev / betabar