def to_netflux(flux):
    r"""Compute the netflux from the gross flux.

        f_ij^{+}=max{0, f_ij-f_ji}
        for all pairs i,j

    Parameters
    ----------
    flux : (M, M) ndarray
        Matrix of flux values between pairs of states.

    Returns
    -------
    netflux : (M, M) ndarray
        Matrix of netflux values between pairs of states.

    """
    netflux = flux - np.transpose(flux)
    """Set negative fluxes to zero"""
    ind = (netflux < 0.0)
    netflux[ind] = 0.0
    return netflux
def to_netflux ( flux ) : netflux = flux - np . transpose ( flux ) ind = ( netflux < 0.0 ) netflux [ ind ] = 0.0 return netflux
r"""Compute the netflux from the gross flux.

        f_ij^{+}=max{0, f_ij-f_ji}
        for all pairs i,j

    Parameters
    ----------
    flux : (M, M) ndarray
        Matrix of flux values between pairs of states.

    Returns
    -------
    netflux : (M, M) ndarray
        Matrix of netflux values between pairs of states.