def flux_production(F):
    r"""Returns the net flux production for all states

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

    Returns
    -------
    prod : (n) ndarray
        array with flux production (positive) or consumption (negative) at each state
    """
    influxes = np.array(np.sum(F, axis=0)).flatten()  # all that flows in
    outfluxes = np.array(np.sum(F, axis=1)).flatten()  # all that flows out
    prod = outfluxes - influxes  # net flux into nodes
    return prod
r"""Returns the net flux production for all states

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

    Returns
    -------
    prod : (n) ndarray
        array with flux production (positive) or consumption (negative) at each state